| OLD | NEW |
| 1 class updateserver( | 1 class updateserver( |
| 2 $domain, | 2 $domain, |
| 3 $certificate, | 3 $certificate, |
| 4 $private_key, | 4 $private_key, |
| 5 $is_default=false | 5 $is_default=false |
| 6 ) { | 6 ) { |
| 7 class {'nginx': | 7 class {'nginx': |
| 8 worker_processes => 2, | 8 worker_processes => 2, |
| 9 worker_connections => 4000, | 9 worker_connections => 4000, |
| 10 ssl_session_cache => off, | 10 ssl_session_cache => off, |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 | 37 |
| 38 file {$sitescripts_var_dir: | 38 file {$sitescripts_var_dir: |
| 39 ensure => directory, | 39 ensure => directory, |
| 40 mode => 0755, | 40 mode => 0755, |
| 41 owner => 'sitescripts', | 41 owner => 'sitescripts', |
| 42 group => 'sitescripts' | 42 group => 'sitescripts' |
| 43 } | 43 } |
| 44 | 44 |
| 45 $update_manifest_dirs = ["${update_dir}/gecko", | 45 $update_manifest_dirs = ["${update_dir}/gecko", |
| 46 "${update_dir}/adblockplusandroid", | 46 "${update_dir}/adblockplusandroid", |
| 47 "${update_dir}/adblockplusie", |
| 47 "${update_dir}/adblockplussafari"] | 48 "${update_dir}/adblockplussafari"] |
| 48 | 49 |
| 49 file {$update_manifest_dirs: | 50 file {$update_manifest_dirs: |
| 50 ensure => directory, | 51 ensure => directory, |
| 51 mode => 0755, | 52 mode => 0755, |
| 52 owner => 'sitescripts', | 53 owner => 'sitescripts', |
| 53 group => 'sitescripts' | 54 group => 'sitescripts' |
| 54 } | 55 } |
| 55 | 56 |
| 56 file {"${update_dir}/adblockplusie": | |
| 57 ensure => directory, | |
| 58 mode => 0755 | |
| 59 } | |
| 60 | |
| 61 file {"${update_dir}/adblockplusie/update.json": | |
| 62 ensure => file, | |
| 63 source => 'puppet:///modules/updateserver/adblockplusie/update.json', | |
| 64 mode => 0644 | |
| 65 } | |
| 66 | |
| 67 nginx::hostconfig{$domain: | 57 nginx::hostconfig{$domain: |
| 68 source => 'puppet:///modules/updateserver/site.conf', | 58 source => 'puppet:///modules/updateserver/site.conf', |
| 69 is_default => $is_default, | 59 is_default => $is_default, |
| 70 certificate => $certificate, | 60 certificate => $certificate, |
| 71 private_key => $private_key, | 61 private_key => $private_key, |
| 72 log => 'access_log_update' | 62 log => 'access_log_update' |
| 73 } | 63 } |
| 74 | 64 |
| 75 class {'sitescripts': | 65 class {'sitescripts': |
| 76 sitescriptsini_source => 'puppet:///modules/updateserver/sitescripts' | 66 sitescriptsini_source => 'puppet:///modules/updateserver/sitescripts' |
| 77 } | 67 } |
| 78 | 68 |
| 79 $safari_certificate_path = "${sitescripts_var_dir}/adblockplussafari.pem" | 69 $safari_certificate_path = "${sitescripts_var_dir}/adblockplussafari.pem" |
| 80 | 70 |
| 81 file {$safari_certificate_path: | 71 file {$safari_certificate_path: |
| 82 source => 'puppet:///modules/private/adblockplussafari.pem' | 72 source => 'puppet:///modules/private/adblockplussafari.pem' |
| 83 } | 73 } |
| 84 | 74 |
| 85 $repositories_to_sync = ['downloads', 'adblockplus', 'adblockplusandroid', | 75 $repositories_to_sync = ['downloads', 'adblockplus', 'adblockplusandroid', |
| 86 'adblockpluschrome', 'elemhidehelper', 'abpwatcher', | 76 'adblockpluschrome', 'adblockplusie', |
| 87 'abpcustomization', 'urlfixer'] | 77 'elemhidehelper', 'abpwatcher', 'abpcustomization', |
| 78 'urlfixer'] |
| 88 | 79 |
| 89 define fetch_repository() { | 80 define fetch_repository() { |
| 90 $repository_path = "${updateserver::sitescripts_var_dir}/${title}" | 81 $repository_path = "${updateserver::sitescripts_var_dir}/${title}" |
| 91 exec {"fetch_repository_${title}": | 82 exec {"fetch_repository_${title}": |
| 92 command => "hg clone -U https://hg.adblockplus.org/${title} ${repository_p
ath}", | 83 command => "hg clone -U https://hg.adblockplus.org/${title} ${repository_p
ath}", |
| 93 path => '/usr/local/bin:/usr/bin:/bin', | 84 path => '/usr/local/bin:/usr/bin:/bin', |
| 94 user => 'sitescripts', | 85 user => 'sitescripts', |
| 95 timeout => 0, | 86 timeout => 0, |
| 96 onlyif => "test ! -d ${repository_path}", | 87 onlyif => "test ! -d ${repository_path}", |
| 97 require => [Package['mercurial'], File[$updateserver::sitescripts_var_dir]
] | 88 require => [Package['mercurial'], File[$updateserver::sitescripts_var_dir]
] |
| (...skipping 26 matching lines...) Expand all Loading... |
| 124 | 115 |
| 125 cron {'update_update_manifests': | 116 cron {'update_update_manifests': |
| 126 ensure => present, | 117 ensure => present, |
| 127 environment => ['MAILTO=admins@adblockplus.org'], | 118 environment => ['MAILTO=admins@adblockplus.org'], |
| 128 command => $update_update_manifests_script, | 119 command => $update_update_manifests_script, |
| 129 user => 'sitescripts', | 120 user => 'sitescripts', |
| 130 minute => '*/10', | 121 minute => '*/10', |
| 131 require => Exec['update_update_manifests'] | 122 require => Exec['update_update_manifests'] |
| 132 } | 123 } |
| 133 } | 124 } |
| OLD | NEW |