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

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

Issue 29435656: Noissue - Generate content on provision (Closed)
Patch Set: Created May 10, 2017, 5:36 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 creates => "/home/www/${repository}/.hg/hgrc", 114 creates => "/home/www/${repository}/.hg/hgrc",
115 } 115 }
116 116
117 exec {"generate_static_pages":
118 command => "python -m cms.bin.generate_static_pages /home/www/${repository} /var/www/${vhost}",
mathias 2017/05/10 17:56:00 Please export the bits shared with the cronjob com
119 path => ["/usr/bin/", "/bin/"],
120 user => www,
121 require => [Exec["fetch_repo"], Exec["fetch_cms"]],
122 environment => 'PYTHONPATH=/opt/cms:/opt/sitescripts',
123 }
124
117 file {'/var/www': 125 file {'/var/www':
118 ensure => directory, 126 ensure => directory,
119 mode => 755, 127 mode => 755,
120 } 128 }
121 129
122 file {[ 130 file {[
123 "/var/cache/$repository", 131 "/var/cache/$repository",
124 "/var/www/$vhost", 132 "/var/www/$vhost",
125 "/var/www/docs", 133 "/var/www/docs",
126 ]: 134 ]:
127 ensure => directory, 135 ensure => directory,
128 owner => www, 136 owner => www,
129 mode => 755, 137 mode => 755,
130 } 138 }
131 139
132 cron {'update_cms': 140 cron {'update_cms':
133 ensure => present, 141 ensure => present,
134 command => "hg pull -q -u -R /opt/cms", 142 command => "hg pull -q -u -R /opt/cms",
135 minute => '4-59/20', 143 minute => '4-59/20',
136 } 144 }
137 145
138 cron {'update_repo': 146 cron {'update_repo':
139 ensure => present, 147 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}", 148 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, 149 user => www,
142 minute => '5-59/20', 150 minute => '5-59/20',
143 } 151 }
144 152
145 } 153 }
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