| Index: modules/statsmaster/manifests/downloads.pp |
| =================================================================== |
| new file mode 100644 |
| --- /dev/null |
| +++ b/modules/statsmaster/manifests/downloads.pp |
| @@ -0,0 +1,40 @@ |
| +class statsmaster::downloads { |
| + package {['pypy', 'python-jinja2']:} |
| + |
| + class {'sitescripts': |
| + sitescriptsini_source => 'puppet:///modules/statsmaster/sitescripts.ini', |
| + } |
| + |
| + file {'/var/www/stats': |
|
Felix Dahlke
2014/04/25 04:37:08
Could also be merged with the file resource below
|
| + ensure => directory, |
| + mode => 0755, |
| + owner => stats, |
| + } |
| + |
| + file {'/var/www/statsdata': |
| + ensure => directory, |
| + mode => 0755, |
| + owner => stats, |
| + } |
| + |
| + file {'/var/www/statsdata/usercounts.html': |
| + ensure => file, |
| + mode => 0444, |
| + source => 'puppet:///modules/statsmaster/usercounts.html', |
| + owner => stats, |
| + } |
| + |
| + cron {'updatestats': |
| + ensure => present, |
| + require => [ |
| + Package['pypy'], |
| + Package['python-jinja2'], |
| + Exec["fetch_sitescripts"] |
| + ], |
| + command => "pypy -m sitescripts.stats.bin.logprocessor && python -m sitescripts.stats.bin.pagegenerator", |
| + environment => ['MAILTO=admins@adblockplus.org,root', 'PYTHONPATH=/opt/sitescripts'], |
|
Felix Dahlke
2014/04/25 04:37:08
Nit: Wrap at 80 columns? (Note that for the line a
|
| + user => stats, |
| + hour => 1, |
| + minute => 30, |
| + } |
| +} |