OLD | NEW |
1 class statsmaster::downloads { | 1 class statsmaster::downloads { |
2 package {['pypy', 'python-jinja2']:} | 2 package {['pypy', 'python-jinja2']:} |
3 | 3 |
4 class {'sitescripts': | 4 class {'sitescripts': |
5 sitescriptsini_source => 'puppet:///modules/statsmaster/sitescripts.ini', | 5 sitescriptsini_source => 'puppet:///modules/statsmaster/sitescripts.ini', |
6 } | 6 } |
7 | 7 |
8 file {'/var/www/stats': | 8 file {['/var/www/stats', '/var/www/statsdata']: |
9 ensure => directory, | |
10 mode => 0755, | |
11 owner => stats, | |
12 } | |
13 | |
14 file {'/var/www/statsdata': | |
15 ensure => directory, | 9 ensure => directory, |
16 mode => 0755, | 10 mode => 0755, |
17 owner => stats, | 11 owner => stats, |
18 } | 12 } |
19 | 13 |
20 file {'/var/www/statsdata/usercounts.html': | 14 file {'/var/www/statsdata/usercounts.html': |
21 ensure => file, | 15 ensure => file, |
22 mode => 0444, | 16 mode => 0444, |
23 source => 'puppet:///modules/statsmaster/usercounts.html', | 17 source => 'puppet:///modules/statsmaster/usercounts.html', |
24 owner => stats, | 18 owner => stats, |
25 } | 19 } |
26 | 20 |
27 cron {'updatestats': | 21 cron {'updatestats': |
28 ensure => present, | 22 ensure => present, |
29 require => [ | 23 require => [ |
30 Package['pypy'], | 24 Package['pypy'], |
31 Package['python-jinja2'], | 25 Package['python-jinja2'], |
32 Exec["fetch_sitescripts"] | 26 Exec["fetch_sitescripts"] |
33 ], | 27 ], |
34 command => "pypy -m sitescripts.stats.bin.logprocessor && python -m sitescri
pts.stats.bin.pagegenerator", | 28 command => "pypy -m sitescripts.stats.bin.logprocessor && python -m sitescri
pts.stats.bin.pagegenerator", |
35 environment => ['MAILTO=admins@adblockplus.org,root', 'PYTHONPATH=/opt/sites
cripts'], | 29 environment => ['MAILTO=admins@adblockplus.org,root', |
| 30 'PYTHONPATH=/opt/sitescripts'], |
36 user => stats, | 31 user => stats, |
37 hour => 1, | 32 hour => 1, |
38 minute => 30, | 33 minute => 30, |
39 } | 34 } |
40 } | 35 } |
OLD | NEW |