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

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

Issue 29438571: Noissue - Improve web repository clone command (Closed)
Patch Set: Created May 16, 2017, 1:01 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 } 100 }
101 101
102 exec {"fetch_cms": 102 exec {"fetch_cms":
103 command => "hg clone https://hg.adblockplus.org/cms/ /opt/cms", 103 command => "hg clone https://hg.adblockplus.org/cms/ /opt/cms",
104 path => ["/usr/bin/", "/bin/"], 104 path => ["/usr/bin/", "/bin/"],
105 require => Package['mercurial'], 105 require => Package['mercurial'],
106 timeout => 0, 106 timeout => 0,
107 creates => "/opt/cms/.hg/hgrc", 107 creates => "/opt/cms/.hg/hgrc",
108 } 108 }
109 109
110 $fetch_repo_cmd = [
111 "hg", "clone", "-U", "https://hg.adblockplus.org/${repository}",
mathias 2017/05/16 09:02:07 Please use single quotes.
112 "/home/www/${repository}",
113 ]
114
110 exec {"fetch_repo": 115 exec {"fetch_repo":
111 command => "hg clone -U https://hg.adblockplus.org/${repository} /home/www/$ {repository}", 116 command => shellquote($fetch_repo_cmd),
112 path => ["/usr/bin/", "/bin/"], 117 path => ["/usr/bin/", "/bin/"],
113 require => Package['mercurial'], 118 require => Package['mercurial'],
114 user => www, 119 user => www,
115 timeout => 0, 120 timeout => 0,
116 creates => "/home/www/${repository}/.hg/hgrc", 121 creates => "/home/www/${repository}/.hg/hgrc",
117 } 122 }
118 123
119 $initialize_content_exec = [ 124 $initialize_content_exec = [
120 'python', '-m', 'cms.bin.generate_static_pages', 125 'python', '-m', 'cms.bin.generate_static_pages',
121 "/home/www/${repository}", "/var/www/${vhost}", 126 "/home/www/${repository}", "/var/www/${vhost}",
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 ) 169 )
165 170
166 cron {'update_repo': 171 cron {'update_repo':
167 ensure => present, 172 ensure => present,
168 command => $update_webpage_cmd, 173 command => $update_webpage_cmd,
169 user => www, 174 user => www,
170 minute => '5-59/20', 175 minute => '5-59/20',
171 } 176 }
172 177
173 } 178 }
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