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

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

Issue 29438568: Noissue - Improve CMS repository pull command (Closed)
Patch Set: Created May 16, 2017, 12:58 a.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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
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", "-q", "-u", "-R", "/opt/cms",
mathias 2017/05/16 09:00:07 This should be all single quotes.
150 ]
151
148 cron {'update_cms': 152 cron {'update_cms':
149 ensure => present, 153 ensure => present,
150 command => "hg pull -q -u -R /opt/cms", 154 command => shellquote($update_cms_cmd),
151 minute => '4-59/20', 155 minute => '4-59/20',
152 } 156 }
153 157
154 $update_repo_cmd = [ 158 $update_repo_cmd = [
155 "hg", "pull", "-q", "-R", "/home/www/${repository}", 159 "hg", "pull", "-q", "-R", "/home/www/${repository}",
156 ] 160 ]
157 161
158 $update_webpage_cmd = join( 162 $update_webpage_cmd = join(
159 [ 163 [
160 shellquote($update_repo_cmd), 164 shellquote($update_repo_cmd),
161 shellquote($initialize_content_exec) 165 shellquote($initialize_content_exec)
162 ], 166 ],
163 "&&" 167 "&&"
164 ) 168 )
165 169
166 cron {'update_repo': 170 cron {'update_repo':
167 ensure => present, 171 ensure => present,
168 command => $update_webpage_cmd, 172 command => $update_webpage_cmd,
169 user => www, 173 user => www,
170 minute => '5-59/20', 174 minute => '5-59/20',
171 } 175 }
172 176
173 } 177 }
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