Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: modules/filtermaster/manifests/init.pp

Issue 6029451183783936: Add Filtermaster (Closed)
Patch Set: Created Nov. 8, 2013, 8:35 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 class filtermaster {
2 #changing cron default
Felix Dahlke 2013/11/08 08:55:58 I find this rather obvious, same goes for the othe
christian 2013/11/08 11:36:56 Done.
3 Cron{
Felix Dahlke 2013/11/08 08:55:58 Space before "{"
christian 2013/11/08 11:36:56 Done.
4 environment => ['MAILTO=cvervoorts@adblockplus.org', 'PYTHONPATH=/opt/sitesc ripts'],
5 }
6
7 class {'ssh':
8 custom_configuration => 'Match User rsync
9 AllowTcpForwarding no
10 X11Forwarding no
11 AllowAgentForwarding no
12 GatewayPorts no
13 ForceCommand rsync --server --sender -vltprz --delete-excluded --exclude CVS . /home/rsync/subscriptions/'
14 }
Felix Dahlke 2013/11/08 08:55:58 Indentation is off here.
christian 2013/11/08 11:36:56 Done.
15
16 #add user
17 user { 'rsync':
Felix Dahlke 2013/11/08 08:55:58 No space between "{" and "'".
christian 2013/11/08 11:36:56 Done.
18 ensure => present,
Felix Dahlke 2013/11/08 08:55:58 We never align operators on columns, so just a sin
christian 2013/11/08 11:36:56 Done.
19 comment => 'Filter list mirror user',
20 home => '/home/rsync',
21 managehome => true
22 }
23
24 file {'/home/rsync/.ssh':
25 ensure => directory,
Felix Dahlke 2013/11/08 08:55:58 Indentation is off here, should be two spaces.
christian 2013/11/08 11:36:56 Done.
26 require => User['rsync'],
27 owner => rsync,
28 mode => 0600;
Felix Dahlke 2013/11/08 08:55:58 No semicolon here.
christian 2013/11/08 11:36:56 Done.
29 }
30
31 file {'/home/rsync/.ssh/authorized_keys':
32 ensure => file,
Felix Dahlke 2013/11/08 08:55:58 Indentation is off here as well.
christian 2013/11/08 11:36:56 Done.
33 require => [
34 File['/home/rsync/.ssh'],
Felix Dahlke 2013/11/08 08:55:58 Puppet normally requires parent directories automa
christian 2013/11/08 11:36:56 I think it's needed to set the permissions of the
Felix Dahlke 2013/11/08 15:49:39 I'd be really surprised if it was necessary. Can y
35 User['rsync']
36 ],
37 owner => rsync,
38 mode => 0600,
39 source => 'puppet:///modules/filtermaster/authorized_keys'
40 }
41
42 file {'/etc/sitescripts':
Felix Dahlke 2013/11/08 08:55:58 I think you should pass this to the sitescripts cl
christian 2013/11/08 11:36:56 The scripts are not taking the sitescripts.ini fil
Felix Dahlke 2013/11/08 15:49:39 You use sitescriptsini_source at the bottom of the
43 ensure => file,
Felix Dahlke 2013/11/08 08:55:58 Indentation's off again.
christian 2013/11/08 11:36:56 Done.
44 owner => root,
45 mode => 0644,
46 source => 'puppet:///modules/filtermaster/sitescripts'
47 }
48
49 #donwload the repos
50
51 exec { "fetch_easylist":
Felix Dahlke 2013/11/08 08:55:58 No space before ", " should actually be '. Likewis
52 command => "hg clone https://hg.adblockplus.org/easylist /home/rsync/subscri ption/easylist",
53 path => ["/usr/bin/", "/bin/"],
54 require => Package['mercurial'],
55 user => rsync,
56 timeout => 0,
57 onlyif => "test ! -d /home/rsync/subscription/easylist"
58 }
59
60 exec { "fetch_easylist_germany":
61 command => "hg clone https://hg.adblockplus.org/easylistgermany /home/rsync/ subscription/easylistgermany",
62 path => ["/usr/bin/", "/bin/"],
63 require => Package['mercurial'],
64 user => rsync,
65 timeout => 0,
66 onlyif => "test ! -d /home/rsync/subscription/easylistgermany"
67 }
68
69 exec { "fetch_easylist_italy":
70 command => "hg clone https://hg.adblockplus.org/easylistitaly /home/rsync/su bscription/easylistitaly",
71 path => ["/usr/bin/", "/bin/"],
72 require => Package['mercurial'],
73 user => rsync,
74 timeout => 0,
75 onlyif => "test ! -d /home/rsync/subscription/easylistitaly"
76 }
77
78 exec { "fetch_easylist_combinations":
79 command => "hg clone https://hg.adblockplus.org/easylistcombinations /home/r sync/subscription/easylistcombinations",
80 path => ["/usr/bin/", "/bin/"],
81 require => Package['mercurial'],
82 user => rsync,
83 timeout => 0,
84 onlyif => "test ! -d /home/rsync/subscription/easylistcombinations"
85 }
86
87 exec { "fetch_malwaredomains":
88 command => "hg clone https://hg.adblockplus.org/malwaredomains /home/rsync/s ubscription/malwaredomains",
89 path => ["/usr/bin/", "/bin/"],
90 require => Package['mercurial'],
91 user => rsync,
92 timeout => 0,
93 onlyif => "test ! -d /home/rsync/subscription/malwaredomains"
94 }
95
96 exec { "fetch_ruadlist":
97 command => "hg clone https://hg.adblockplus.org/ruadlist /home/rsync/subscri ption/ruadlist",
98 path => ["/usr/bin/", "/bin/"],
99 require => Package['mercurial'],
100 user => rsync,
101 timeout => 0,
102 onlyif => "test ! -d /home/rsync/subscription/ruadlist"
103 }
104
105 exec { "fetch_listefr":
106 command => "hg clone https://hg.adblockplus.org/listefr /home/rsync/subscrip tion/listefr",
107 path => ["/usr/bin/", "/bin/"],
108 require => Package['mercurial'],
109 user => rsync,
110 timeout => 0,
111 onlyif => "test ! -d /home/rsync/subscription/listefr"
112 }
113
114 exec { "fetch_exceptionrules":
115 command => "hg clone https://hg.adblockplus.org/exceptionrules /home/rsync/s ubscription/exceptionrules",
116 path => ["/usr/bin/", "/bin/"],
117 require => Package['mercurial'],
118 user => rsync,
119 timeout => 0,
120 onlyif => "test ! -d /home/rsync/subscription/exceptionrules"
121 }
122
123 #cron entrys
124
125 cron { updateSubscription:
Felix Dahlke 2013/11/08 08:55:58 No space after "{", and updateSubscription should
christian 2013/11/08 11:36:56 Done.
126 ensure => present,
127 command => "python -m sitescripts.subscriptions.bin.updateSubscriptionDownlo ads 3>&1 1>/dev/null 2>&3 | perl -pe 's/^/\"[\" . scalar localtime() . \"] \"/e' >> /tmp/subscription_errors && chmod 666 /tmp/subscription_errors 2>/dev/null",
128 user => rsync,
129 require => [
130 User['rsync']
131 ],
132 minute => '*/10'
133 }
134
Felix Dahlke 2013/11/08 08:55:58 One empty line is enough.
christian 2013/11/08 11:36:56 Done.
135
136 cron { updateMalware:
137 ensure => present,
138 command => "python -m sitescripts.subscriptions.bin.updateMalwareDomainsList ",
139 user => rsync,
140 require => [
141 User['rsync']
142 ],
143 hour => '*/6',
144 minute => 15
145 }
146
147 # cron { forwardErrors:
Felix Dahlke 2013/11/08 08:55:58 Please remove this code, it's commented out anyway
christian 2013/11/08 11:36:56 Done.
148 # ensure => present,
149 # command => "/srv/www/vhosts/adblockplus.org/files/forward_subscription _errors.sh",
150 # user => rsync,
151 # require => [
152 # User['rsync']
153 # ],
154 # hour => 0,
155 # minute => 0
156 # }
157
158 class {'sitescripts':
159 sitescriptsini_source => 'puppet:///modules/filtermaster/sitescripts.ini'
160 }
161
162 }
OLDNEW
« modules/filtermaster/files/sitescripts.ini ('K') | « modules/filtermaster/files/sitescripts.ini ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld