OLD | NEW |
1 class filterserver { | 1 class filterserver { |
2 user {'subscriptionstat': | |
3 ensure => present, | |
4 home => '/home/subscriptionstat', | |
5 managehome => true | |
6 } | |
7 | |
8 file {'/home/subscriptionstat/.ssh': | |
9 ensure => directory, | |
10 owner => subscriptionstat, | |
11 mode => 0600, | |
12 require => User['subscriptionstat'] | |
13 } | |
14 | |
15 file {'/home/subscriptionstat/.ssh/authorized_keys': | |
16 ensure => present, | |
17 owner => subscriptionstat, | |
18 mode => 0400, | |
19 source => 'puppet:///modules/private/subscriptionstat-authorized_keys' | |
20 } | |
21 | |
22 class {'ssh': | |
23 custom_configuration => 'Match User subscriptionstat | |
24 AllowTcpForwarding no | |
25 X11Forwarding no | |
26 AllowAgentForwarding no | |
27 GatewayPorts no | |
28 ForceCommand cat /var/www/subscriptionStats.ini' | |
29 } | |
30 | |
31 class {'nginx': | 2 class {'nginx': |
32 worker_processes => 2, | 3 worker_processes => 2, |
33 worker_connections => 4000, | 4 worker_connections => 4000, |
34 ssl_session_cache => off, | 5 ssl_session_cache => off, |
35 } | 6 } |
36 | 7 |
37 class {'sitescripts': | 8 class {'statsclient': |
38 sitescriptsini_source => 'puppet:///modules/filterserver/sitescripts.ini' | 9 log_path => '/var/log/nginx/access_log_easylist_downloads.1.gz', |
39 } | 10 } |
40 | 11 |
41 package {'python-geoip':} | 12 user {'subscriptionstat': |
| 13 ensure => absent, |
| 14 } |
42 | 15 |
43 user {'rsync': | 16 user {'rsync': |
44 ensure => present, | 17 ensure => present, |
45 comment => 'Filter list mirror user', | 18 comment => 'Filter list mirror user', |
46 home => '/home/rsync', | 19 home => '/home/rsync', |
47 managehome => true | 20 managehome => true |
48 } | 21 } |
49 | 22 |
50 File { | 23 File { |
51 owner => root, | 24 owner => root, |
52 group => root, | 25 group => root, |
53 mode => 0644, | 26 mode => 0644, |
54 } | 27 } |
55 | 28 |
56 file {'/var/www': | 29 file {'/var/www': |
57 ensure => directory | 30 ensure => directory |
58 } | 31 } |
59 | 32 |
60 file {'/var/www/easylist': | 33 file {'/var/www/easylist': |
61 ensure => directory, | 34 ensure => directory, |
62 require => [ | 35 require => [ |
63 File['/var/www'], | 36 File['/var/www'], |
64 User['rsync'] | 37 User['rsync'] |
65 ], | 38 ], |
66 owner => rsync | 39 owner => rsync |
67 } | 40 } |
68 | 41 |
69 file {'/var/www/subscriptionStats.ini': | |
70 ensure => present, | |
71 owner => rsync | |
72 } | |
73 | |
74 file {'/etc/nginx/sites-available/inc.easylist-downloads': | 42 file {'/etc/nginx/sites-available/inc.easylist-downloads': |
75 ensure => absent, | 43 ensure => absent, |
76 } | 44 } |
77 | 45 |
78 file {'/etc/nginx/sites-available/inc.easylist-downloads-txt': | 46 file {'/etc/nginx/sites-available/inc.easylist-downloads-txt': |
79 ensure => absent | 47 ensure => absent |
80 } | 48 } |
81 | 49 |
82 file {'/etc/nginx/sites-available/inc.easylist-downloads-tpl': | 50 file {'/etc/nginx/sites-available/inc.easylist-downloads-tpl': |
83 ensure => absent | 51 ensure => absent |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 ensure => file, | 110 ensure => file, |
143 require => [ | 111 require => [ |
144 File['/home/rsync/.ssh'], | 112 File['/home/rsync/.ssh'], |
145 User['rsync'] | 113 User['rsync'] |
146 ], | 114 ], |
147 owner => rsync, | 115 owner => rsync, |
148 mode => 0400, | 116 mode => 0400, |
149 source => 'puppet:///modules/private/rsync@easylist-downloads.adblockplus.or
g.pub' | 117 source => 'puppet:///modules/private/rsync@easylist-downloads.adblockplus.or
g.pub' |
150 } | 118 } |
151 | 119 |
152 file {'/opt/cron_geoipdb_update.sh': | |
153 ensure => file, | |
154 mode => 0750, | |
155 source => 'puppet:///modules/filterserver/cron_geoipdb_update.sh' | |
156 } | |
157 | |
158 cron {'mirror': | 120 cron {'mirror': |
159 ensure => present, | 121 ensure => present, |
160 require => [ | 122 require => [ |
161 File['/home/rsync/.ssh/known_hosts'], | 123 File['/home/rsync/.ssh/known_hosts'], |
162 File['/home/rsync/.ssh/id_rsa'], | 124 File['/home/rsync/.ssh/id_rsa'], |
163 User['rsync'] | 125 User['rsync'] |
164 ], | 126 ], |
165 command => 'rsync -e ssh -ltprz rsync@ssh.adblockplus.org:. /var/www/easylis
t/', | 127 command => 'rsync -e ssh -ltprz rsync@ssh.adblockplus.org:. /var/www/easylis
t/', |
166 user => rsync, | 128 user => rsync, |
167 hour => '*', | 129 hour => '*', |
168 minute => '2-52/10' | 130 minute => '2-52/10' |
169 } | 131 } |
170 | |
171 cron {'mirrorstats': | |
172 ensure => present, | |
173 require => [ | |
174 User['rsync'], | |
175 Package['python-geoip'], | |
176 Exec["fetch_sitescripts"] | |
177 ], | |
178 command => 'gzip -cd /var/log/nginx/access_log_easylist_downloads.1.gz | pyt
hon -m sitescripts.logs.bin.extractSubscriptionStats', | |
179 environment => ['MAILTO=admins@adblockplus.org', 'PYTHONPATH=/opt/sitescript
s'], | |
180 user => rsync, | |
181 hour => 1, | |
182 minute => 25 | |
183 } | |
184 | |
185 cron {'geoipdb_update': | |
186 ensure => present, | |
187 require => File['/opt/cron_geoipdb_update.sh'], | |
188 command => '/opt/cron_geoipdb_update.sh', | |
189 user => root, | |
190 hour => 3, | |
191 minute => 15, | |
192 monthday => 3 | |
193 } | |
194 | |
195 } | 132 } |
OLD | NEW |