| Index: modules/statsclient/manifests/init.pp |
| =================================================================== |
| --- a/modules/statsclient/manifests/init.pp |
| +++ b/modules/statsclient/manifests/init.pp |
| @@ -1,15 +1,9 @@ |
| -class statsclient ( |
| - $log_path, |
| - $custom_sitescriptsini_source = [], |
| - ) { |
| - |
| - $sitescriptsini_source = flatten(['puppet:///modules/statsclient/sitescripts.ini', $custom_sitescriptsini_source]) |
| - |
| +class statsclient { |
| user {'stats': |
| ensure => present, |
| home => '/home/stats', |
| managehome => true, |
| } |
| file {'/home/stats/.ssh': |
| ensure => directory, |
| @@ -26,55 +20,16 @@ class statsclient ( |
| } |
| class {'ssh': |
| custom_configuration => 'Match User stats |
| AllowTcpForwarding no |
| X11Forwarding no |
| AllowAgentForwarding no |
| GatewayPorts no |
| - ForceCommand cat /var/www/stats.json', |
| - } |
| - |
| - class {'sitescripts': |
| - sitescriptsini_source => $sitescriptsini_source, |
| - } |
| - |
| - package {'pypy':} |
| - |
| - file {'/var/www/stats.json': |
| - ensure => present, |
| - owner => stats, |
| - mode => 644, |
| - } |
| - |
| - file {'/opt/cron_geoipdb_update.sh': |
| - ensure => file, |
| - owner => root, |
| - mode => 0750, |
| - source => 'puppet:///modules/statsclient/cron_geoipdb_update.sh', |
| + ForceCommand (echo $SSH_ORIGINAL_COMMAND | grep -qv /) && cat "/var/log/nginx/$SSH_ORIGINAL_COMMAND"', |
| } |
| cron {'mirrorstats': |
| - ensure => present, |
| - require => [ |
| - User['stats'], |
| - Package['pypy'], |
| - Exec["fetch_sitescripts"] |
| - ], |
| - command => "gzip -cd ${log_path} | pypy -m sitescripts.stats.bin.logprocessor", |
| - environment => ['MAILTO=admins@adblockplus.org,root', 'PYTHONPATH=/opt/sitescripts'], |
| + ensure => absent, |
| user => stats, |
| - hour => 0, |
| - minute => 25, |
| - } |
| - |
| - cron {'geoipdb_update': |
| - ensure => present, |
| - require => File['/opt/cron_geoipdb_update.sh'], |
| - command => '/opt/cron_geoipdb_update.sh', |
| - environment => ['MAILTO=admins@adblockplus.org,root'], |
| - user => root, |
| - hour => 3, |
| - minute => 15, |
| - monthday => 3, |
| } |
| } |