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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 file {[ | 138 file {[ |
139 "/var/cache/$repository", | 139 "/var/cache/$repository", |
140 "/var/www/$vhost", | 140 "/var/www/$vhost", |
141 "/var/www/docs", | 141 "/var/www/docs", |
142 ]: | 142 ]: |
143 ensure => directory, | 143 ensure => directory, |
144 owner => www, | 144 owner => www, |
145 mode => 755, | 145 mode => 755, |
146 } | 146 } |
147 | 147 |
| 148 $update_cms_cmd = [ |
| 149 "hg", "pull", |
| 150 "--quiet", |
| 151 "--update", |
| 152 "--repository", "/opt/cms", |
| 153 ] |
| 154 |
148 cron {'update_cms': | 155 cron {'update_cms': |
149 ensure => present, | 156 ensure => present, |
150 command => "hg pull -q -u -R /opt/cms", | 157 command => shellquote($update_cms_cmd), |
151 minute => '4-59/20', | 158 minute => '4-59/20', |
152 } | 159 } |
153 | 160 |
154 $update_repo_cmd = [ | 161 $update_repo_cmd = [ |
155 "hg", "pull", "-q", "-R", "/home/www/${repository}", | 162 "hg", "pull", "-q", "-R", "/home/www/${repository}", |
156 ] | 163 ] |
157 | 164 |
158 $update_webpage_cmd = join( | 165 $update_webpage_cmd = join( |
159 [ | 166 [ |
160 shellquote($update_repo_cmd), | 167 shellquote($update_repo_cmd), |
161 shellquote($initialize_content_exec) | 168 shellquote($initialize_content_exec) |
162 ], | 169 ], |
163 "&&" | 170 "&&" |
164 ) | 171 ) |
165 | 172 |
166 cron {'update_repo': | 173 cron {'update_repo': |
167 ensure => present, | 174 ensure => present, |
168 command => $update_webpage_cmd, | 175 command => $update_webpage_cmd, |
169 user => www, | 176 user => www, |
170 minute => '5-59/20', | 177 minute => '5-59/20', |
171 } | 178 } |
172 | 179 |
173 } | 180 } |
OLD | NEW |