| OLD | NEW |
| 1 class web::server( | 1 class web::server( |
| 2 $vhost, | 2 $vhost, |
| 3 $repository, | 3 $repository, |
| 4 $remote = "https://hg.adblockplus.org/${repository}", |
| 4 $certificate = hiera('web::server::certificate', 'undef'), | 5 $certificate = hiera('web::server::certificate', 'undef'), |
| 5 $private_key = hiera('web::server::private_key', 'undef'), | 6 $private_key = hiera('web::server::private_key', 'undef'), |
| 6 $is_default = false, | 7 $is_default = false, |
| 7 $aliases = undef, | 8 $aliases = undef, |
| 8 $custom_config = undef, | 9 $custom_config = undef, |
| 9 $multiplexer_locations = undef, | 10 $multiplexer_locations = undef, |
| 10 $geoip = false, | 11 $geoip = false, |
| 11 ) { | 12 ) { |
| 12 | 13 |
| 13 include sitescripts | 14 include sitescripts |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 'https://hg.adblockplus.org/cms/', | 106 'https://hg.adblockplus.org/cms/', |
| 106 '/opt/cms', | 107 '/opt/cms', |
| 107 ] | 108 ] |
| 108 | 109 |
| 109 Exec { | 110 Exec { |
| 110 path => ["/usr/bin/", "/bin/"], | 111 path => ["/usr/bin/", "/bin/"], |
| 111 } | 112 } |
| 112 | 113 |
| 113 exec {"fetch_cms": | 114 exec {"fetch_cms": |
| 114 command => shellquote($fetch_cms_cmd), | 115 command => shellquote($fetch_cms_cmd), |
| 115 require => Package['mercurial'], | 116 require => Class['adblockplus::mercurial'], |
| 116 timeout => 0, | 117 timeout => 0, |
| 117 creates => "/opt/cms/.hg/hgrc", | 118 creates => "/opt/cms/.hg/hgrc", |
| 118 } | 119 } |
| 119 | 120 |
| 120 $fetch_repo_cmd = [ | 121 $fetch_repo_cmd = [ |
| 121 'hg', 'clone', | 122 'hg', 'clone', |
| 122 '--noupdate', | 123 '--noupdate', |
| 123 "https://hg.adblockplus.org/${repository}", | 124 $remote, |
| 124 "/home/www/${repository}", | 125 "/home/www/${repository}", |
| 125 ] | 126 ] |
| 126 | 127 |
| 127 exec {"fetch_repo": | 128 exec {"fetch_repo": |
| 128 command => shellquote($fetch_repo_cmd), | 129 command => shellquote($fetch_repo_cmd), |
| 129 require => Package['mercurial'], | 130 require => Class['adblockplus::mercurial'], |
| 130 user => www, | 131 user => www, |
| 131 timeout => 0, | 132 timeout => 0, |
| 132 creates => "/home/www/${repository}/.hg/hgrc", | 133 creates => "/home/www/${repository}/.hg/hgrc", |
| 133 } | 134 } |
| 134 | 135 |
| 135 $initialize_content_exec = [ | 136 $initialize_content_exec = [ |
| 136 'python', '-m', 'cms.bin.generate_static_pages', | 137 'python', '-m', 'cms.bin.generate_static_pages', |
| 137 "/home/www/${repository}", "/var/www/${vhost}", | 138 "/home/www/${repository}", "/var/www/${vhost}", |
| 138 ] | 139 ] |
| 139 | 140 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 ) | 184 ) |
| 184 | 185 |
| 185 cron {'update_repo': | 186 cron {'update_repo': |
| 186 ensure => present, | 187 ensure => present, |
| 187 command => $update_webpage_cmd, | 188 command => $update_webpage_cmd, |
| 188 user => www, | 189 user => www, |
| 189 minute => '5-59/20', | 190 minute => '5-59/20', |
| 190 } | 191 } |
| 191 | 192 |
| 192 } | 193 } |
| OLD | NEW |