Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: modules/web/manifests/server.pp

Issue 29439636: Noissue - Improve web repository pull command (Closed)
Patch Set: Created May 16, 2017, 9:44 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 '--repository', '/opt/cms', 165 '--repository', '/opt/cms',
166 ] 166 ]
167 167
168 cron {'update_cms': 168 cron {'update_cms':
169 ensure => present, 169 ensure => present,
170 command => shellquote($update_cms_cmd), 170 command => shellquote($update_cms_cmd),
171 minute => '4-59/20', 171 minute => '4-59/20',
172 } 172 }
173 173
174 $update_repo_cmd = [ 174 $update_repo_cmd = [
175 "hg", "pull", "-q", "-R", "/home/www/${repository}", 175 'hg', 'pull',
176 '--quiet',
177 '--repository', "/home/www/${repository}",
176 ] 178 ]
177 179
178 $update_webpage_cmd = join( 180 $update_webpage_cmd = join(
179 [ 181 [
180 shellquote($update_repo_cmd), 182 shellquote($update_repo_cmd),
181 shellquote($initialize_content_exec) 183 shellquote($initialize_content_exec)
182 ], 184 ],
183 "&&" 185 "&&"
184 ) 186 )
185 187
186 cron {'update_repo': 188 cron {'update_repo':
187 ensure => present, 189 ensure => present,
188 command => $update_webpage_cmd, 190 command => $update_webpage_cmd,
189 user => www, 191 user => www,
190 minute => '5-59/20', 192 minute => '5-59/20',
191 } 193 }
192 194
193 } 195 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld