| OLD | NEW |
| 1 class filtermaster { | 1 class filtermaster( |
| 2 $repos = hiera('filtermaster::repos', []), |
| 3 $repo_downloads = hiera('filtermaster::repo_downloads', {}), |
| 4 ) { |
| 2 | 5 |
| 3 Cron { | 6 Cron { |
| 4 environment => ['MAILTO=admins@adblockplus.org', 'PYTHONPATH=/opt/sitescript
s'], | 7 environment => ['MAILTO=admins@adblockplus.org', 'PYTHONPATH=/opt/sitescript
s'], |
| 5 } | 8 } |
| 6 | 9 |
| 7 include ssh | 10 include ssh |
| 8 | 11 |
| 9 concat::fragment {'sshd_max_limits': | 12 concat::fragment {'sshd_max_limits': |
| 10 target => 'sshd_config', | 13 target => 'sshd_config', |
| 11 order => '50', | 14 order => '50', |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 exec {"fetch_${title}": | 94 exec {"fetch_${title}": |
| 92 command => "hg clone https://hg.adblockplus.org/${title} /home/rsync/subsc
ription/${title}", | 95 command => "hg clone https://hg.adblockplus.org/${title} /home/rsync/subsc
ription/${title}", |
| 93 path => ["/usr/bin/", "/bin/"], | 96 path => ["/usr/bin/", "/bin/"], |
| 94 require => Package['mercurial'], | 97 require => Package['mercurial'], |
| 95 user => rsync, | 98 user => rsync, |
| 96 timeout => 0, | 99 timeout => 0, |
| 97 onlyif => "test ! -d /home/rsync/subscription/${title}" | 100 onlyif => "test ! -d /home/rsync/subscription/${title}" |
| 98 } | 101 } |
| 99 } | 102 } |
| 100 | 103 |
| 101 create_resources('filtermaster::repo_download', $repo_download) | 104 create_resources('filtermaster::repo_download', $repo_downloads) |
| 105 |
| 106 repo_download {$repos: |
| 107 } |
| 102 | 108 |
| 103 cron {'update_subscription': | 109 cron {'update_subscription': |
| 104 ensure => present, | 110 ensure => present, |
| 105 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", | 111 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", |
| 106 user => rsync, | 112 user => rsync, |
| 107 require => User['rsync'], | 113 require => User['rsync'], |
| 108 minute => '*/10' | 114 minute => '*/10' |
| 109 } | 115 } |
| 110 | 116 |
| 111 cron {'update_malware': | 117 cron {'update_malware': |
| (...skipping 13 matching lines...) Expand all Loading... |
| 125 User['rsync'], | 131 User['rsync'], |
| 126 File['/home/rsync/update_repos.sh'] | 132 File['/home/rsync/update_repos.sh'] |
| 127 ], | 133 ], |
| 128 minute => '8-58/10' | 134 minute => '8-58/10' |
| 129 } | 135 } |
| 130 | 136 |
| 131 class {'sitescripts': | 137 class {'sitescripts': |
| 132 sitescriptsini_content => template('filtermaster/sitescripts.ini.erb'), | 138 sitescriptsini_content => template('filtermaster/sitescripts.ini.erb'), |
| 133 } | 139 } |
| 134 } | 140 } |
| OLD | NEW |