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

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

Issue 29430622: Noissue - Consider Mercurial repository as absent without the .hg/hgrc file (Closed)
Patch Set: Created May 5, 2017, 5:50 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 $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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 comment => 'Web content owner', 95 comment => 'Web content owner',
96 home => '/home/www', 96 home => '/home/www',
97 managehome => true, 97 managehome => true,
98 } 98 }
99 99
100 exec {"fetch_cms": 100 exec {"fetch_cms":
101 command => "hg clone https://hg.adblockplus.org/cms/ /opt/cms", 101 command => "hg clone https://hg.adblockplus.org/cms/ /opt/cms",
102 path => ["/usr/bin/", "/bin/"], 102 path => ["/usr/bin/", "/bin/"],
103 require => Package['mercurial'], 103 require => Package['mercurial'],
104 timeout => 0, 104 timeout => 0,
105 onlyif => "test ! -d /opt/cms", 105 onlyif => "test ! -e /opt/cms/.hg/hgrc",
mathias 2017/05/05 18:29:18 You sure this works if the directory previously ex
f.lopez 2017/05/05 19:08:54 Yeah, the problem I found was that when it timed o
106 } 106 }
107 107
108 exec {"fetch_repo": 108 exec {"fetch_repo":
109 command => "hg clone -U https://hg.adblockplus.org/${repository} /home/www/$ {repository}", 109 command => "hg clone -U https://hg.adblockplus.org/${repository} /home/www/$ {repository}",
110 path => ["/usr/bin/", "/bin/"], 110 path => ["/usr/bin/", "/bin/"],
111 require => Package['mercurial'], 111 require => Package['mercurial'],
112 user => www, 112 user => www,
113 timeout => 0, 113 timeout => 0,
114 onlyif => "test ! -d /home/www/${repository}", 114 onlyif => "test ! -e /home/www/${repository}/.hg/hgrc",
115 } 115 }
116 116
117 file {'/var/www': 117 file {'/var/www':
118 ensure => directory, 118 ensure => directory,
119 mode => 755, 119 mode => 755,
120 } 120 }
121 121
122 file {[ 122 file {[
123 "/var/cache/$repository", 123 "/var/cache/$repository",
124 "/var/www/$vhost", 124 "/var/www/$vhost",
(...skipping 11 matching lines...) Expand all
136 } 136 }
137 137
138 cron {'update_repo': 138 cron {'update_repo':
139 ensure => present, 139 ensure => present,
140 command => "hg pull -q -R /home/www/${repository} && python -m cms.bin.gener ate_static_pages /home/www/${repository} /var/www/${vhost}", 140 command => "hg pull -q -R /home/www/${repository} && python -m cms.bin.gener ate_static_pages /home/www/${repository} /var/www/${vhost}",
141 user => www, 141 user => www,
142 minute => '5-59/20', 142 minute => '5-59/20',
143 } 143 }
144 144
145 } 145 }
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