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

Delta Between Two Patch Sets: modules/web/manifests/server.pp

Issue 29438568: Noissue - Improve CMS repository pull command (Closed)
Left Patch Set: For comment 3 Created May 16, 2017, 7:09 p.m.
Right Patch Set: For comment 3 as well Created May 16, 2017, 7:11 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 = [ 148 $update_cms_cmd = [
149 "hg", "pull", 149 'hg', 'pull',
150 "--quiet", 150 '--quiet',
151 "--update", 151 '--update',
152 "--repository", "/opt/cms", 152 '--repository', '/opt/cms',
153 ] 153 ]
154 154
155 cron {'update_cms': 155 cron {'update_cms':
156 ensure => present, 156 ensure => present,
157 command => shellquote($update_cms_cmd), 157 command => shellquote($update_cms_cmd),
158 minute => '4-59/20', 158 minute => '4-59/20',
159 } 159 }
160 160
161 $update_repo_cmd = [ 161 $update_repo_cmd = [
162 "hg", "pull", "-q", "-R", "/home/www/${repository}", 162 "hg", "pull", "-q", "-R", "/home/www/${repository}",
163 ] 163 ]
164 164
165 $update_webpage_cmd = join( 165 $update_webpage_cmd = join(
166 [ 166 [
167 shellquote($update_repo_cmd), 167 shellquote($update_repo_cmd),
168 shellquote($initialize_content_exec) 168 shellquote($initialize_content_exec)
169 ], 169 ],
170 "&&" 170 "&&"
171 ) 171 )
172 172
173 cron {'update_repo': 173 cron {'update_repo':
174 ensure => present, 174 ensure => present,
175 command => $update_webpage_cmd, 175 command => $update_webpage_cmd,
176 user => www, 176 user => www,
177 minute => '5-59/20', 177 minute => '5-59/20',
178 } 178 }
179 179
180 } 180 }
LEFTRIGHT
« no previous file | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld