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

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

Issue 29526778: #3073 - Support custom remote repository for web::server class (Closed)
Patch Set: Created Aug. 24, 2017, 7:41 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 $remote = "https://hg.adblockplus.org/${repository}",
4 $certificate = hiera('web::server::certificate', 'undef'), 5 $certificate = hiera('web::server::certificate', 'undef'),
5 $private_key = hiera('web::server::private_key', 'undef'), 6 $private_key = hiera('web::server::private_key', 'undef'),
6 $is_default = false, 7 $is_default = false,
7 $aliases = undef, 8 $aliases = undef,
8 $custom_config = undef, 9 $custom_config = undef,
9 $multiplexer_locations = undef, 10 $multiplexer_locations = undef,
10 $geoip = false, 11 $geoip = false,
11 ) { 12 ) {
12 13
13 include sitescripts 14 include sitescripts
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 'https://hg.adblockplus.org/cms/', 106 'https://hg.adblockplus.org/cms/',
106 '/opt/cms', 107 '/opt/cms',
107 ] 108 ]
108 109
109 Exec { 110 Exec {
110 path => ["/usr/bin/", "/bin/"], 111 path => ["/usr/bin/", "/bin/"],
111 } 112 }
112 113
113 exec {"fetch_cms": 114 exec {"fetch_cms":
114 command => shellquote($fetch_cms_cmd), 115 command => shellquote($fetch_cms_cmd),
115 require => Package['mercurial'], 116 require => Class['adblockplus::mercurial'],
116 timeout => 0, 117 timeout => 0,
117 creates => "/opt/cms/.hg/hgrc", 118 creates => "/opt/cms/.hg/hgrc",
118 } 119 }
119 120
120 $fetch_repo_cmd = [ 121 $fetch_repo_cmd = [
121 'hg', 'clone', 122 'hg', 'clone',
122 '--noupdate', 123 '--noupdate',
123 "https://hg.adblockplus.org/${repository}", 124 $remote,
124 "/home/www/${repository}", 125 "/home/www/${repository}",
125 ] 126 ]
126 127
127 exec {"fetch_repo": 128 exec {"fetch_repo":
128 command => shellquote($fetch_repo_cmd), 129 command => shellquote($fetch_repo_cmd),
129 require => Package['mercurial'], 130 require => Class['adblockplus::mercurial'],
130 user => www, 131 user => www,
131 timeout => 0, 132 timeout => 0,
132 creates => "/home/www/${repository}/.hg/hgrc", 133 creates => "/home/www/${repository}/.hg/hgrc",
133 } 134 }
134 135
135 $initialize_content_exec = [ 136 $initialize_content_exec = [
136 'python', '-m', 'cms.bin.generate_static_pages', 137 'python', '-m', 'cms.bin.generate_static_pages',
137 "/home/www/${repository}", "/var/www/${vhost}", 138 "/home/www/${repository}", "/var/www/${vhost}",
138 ] 139 ]
139 140
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 ) 184 )
184 185
185 cron {'update_repo': 186 cron {'update_repo':
186 ensure => present, 187 ensure => present,
187 command => $update_webpage_cmd, 188 command => $update_webpage_cmd,
188 user => www, 189 user => www,
189 minute => '5-59/20', 190 minute => '5-59/20',
190 } 191 }
191 192
192 } 193 }
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