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

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

Issue 29438574: Noissue - Improve CMS repository clone command (Closed)
Patch Set: Created May 16, 2017, 1:04 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 } 92 }
93 } 93 }
94 94
95 user {'www': 95 user {'www':
96 ensure => present, 96 ensure => present,
97 comment => 'Web content owner', 97 comment => 'Web content owner',
98 home => '/home/www', 98 home => '/home/www',
99 managehome => true, 99 managehome => true,
100 } 100 }
101 101
102 $fetch_cms_cmd = [
103 "hg", "clone", "https://hg.adblockplus.org/cms/", "/opt/cms",
mathias 2017/05/16 09:01:33 Please use single quotes.
104 ]
105
102 exec {"fetch_cms": 106 exec {"fetch_cms":
103 command => "hg clone https://hg.adblockplus.org/cms/ /opt/cms", 107 command => shellquote($fetch_cms_cmd),
104 path => ["/usr/bin/", "/bin/"], 108 path => ["/usr/bin/", "/bin/"],
105 require => Package['mercurial'], 109 require => Package['mercurial'],
106 timeout => 0, 110 timeout => 0,
107 creates => "/opt/cms/.hg/hgrc", 111 creates => "/opt/cms/.hg/hgrc",
108 } 112 }
109 113
110 exec {"fetch_repo": 114 exec {"fetch_repo":
111 command => "hg clone -U https://hg.adblockplus.org/${repository} /home/www/$ {repository}", 115 command => "hg clone -U https://hg.adblockplus.org/${repository} /home/www/$ {repository}",
112 path => ["/usr/bin/", "/bin/"], 116 path => ["/usr/bin/", "/bin/"],
113 require => Package['mercurial'], 117 require => Package['mercurial'],
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
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