OLD | NEW |
1 class web::server( | 1 class web::server( |
2 $vhost, | 2 $vhost, |
3 $repository, | 3 $repository, |
4 $certificate = hiera('web::server::certificate', 'undef'), | 4 $certificate = hiera('web::server::certificate', 'undef'), |
5 $private_key = hiera('web::server::private_key', 'undef'), | 5 $private_key = hiera('web::server::private_key', 'undef'), |
6 $is_default = false, | 6 $is_default = false, |
7 $aliases = undef, | 7 $aliases = undef, |
8 $custom_config = undef, | 8 $custom_config = undef, |
9 $multiplexer_locations = undef, | 9 $multiplexer_locations = undef, |
10 $geoip = false, | 10 $geoip = false, |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 | 108 |
109 exec {"fetch_cms": | 109 exec {"fetch_cms": |
110 command => shellquote($fetch_cms_cmd), | 110 command => shellquote($fetch_cms_cmd), |
111 require => Class['adblockplus::mercurial'], | 111 require => Class['adblockplus::mercurial'], |
112 timeout => 0, | 112 timeout => 0, |
113 creates => "/opt/cms/.hg/hgrc", | 113 creates => "/opt/cms/.hg/hgrc", |
114 } | 114 } |
115 | 115 |
116 $fetch_repo_cmd = [ | 116 $fetch_repo_cmd = [ |
117 'hg', 'clone', | 117 'hg', 'clone', |
| 118 '--update', 'master', |
118 $remote, | 119 $remote, |
119 "/home/www/${repository}", | 120 "/home/www/${repository}", |
120 ] | 121 ] |
121 | 122 |
122 exec {"fetch_repo": | 123 exec {"fetch_repo": |
123 command => shellquote($fetch_repo_cmd), | 124 command => shellquote($fetch_repo_cmd), |
124 require => Class['adblockplus::mercurial'], | 125 require => Class['adblockplus::mercurial'], |
125 user => www, | 126 user => www, |
126 timeout => 0, | 127 timeout => 0, |
127 creates => "/home/www/${repository}/.hg/hgrc", | 128 creates => "/home/www/${repository}/.hg/hgrc", |
(...skipping 18 matching lines...) Expand all Loading... |
146 "/var/www/docs", | 147 "/var/www/docs", |
147 ]: | 148 ]: |
148 ensure => directory, | 149 ensure => directory, |
149 owner => www, | 150 owner => www, |
150 mode => '0755', | 151 mode => '0755', |
151 } | 152 } |
152 | 153 |
153 $update_cms_cmd = [ | 154 $update_cms_cmd = [ |
154 'hg', 'pull', | 155 'hg', 'pull', |
155 '--quiet', | 156 '--quiet', |
| 157 '--rev', 'master', |
156 '--update', | 158 '--update', |
157 '--repository', '/opt/cms', | 159 '--repository', '/opt/cms', |
158 ] | 160 ] |
159 | 161 |
160 cron {'update_cms': | 162 cron {'update_cms': |
161 ensure => present, | 163 ensure => present, |
162 command => shellquote($update_cms_cmd), | 164 command => shellquote($update_cms_cmd), |
163 minute => '4-59/20', | 165 minute => '4-59/20', |
164 } | 166 } |
165 | 167 |
(...skipping 12 matching lines...) Expand all Loading... |
178 ) | 180 ) |
179 | 181 |
180 cron {'update_repo': | 182 cron {'update_repo': |
181 ensure => present, | 183 ensure => present, |
182 command => $update_webpage_cmd, | 184 command => $update_webpage_cmd, |
183 user => www, | 185 user => www, |
184 minute => '5-59/20', | 186 minute => '5-59/20', |
185 } | 187 } |
186 | 188 |
187 } | 189 } |
OLD | NEW |