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

Unified Diff: modules/web/manifests/server.pp

Issue 29340860: Issue 3996 - Make sure to install current versions of Markdown and Jinja2 modules on web servers (Closed)
Patch Set: Hold apt packages rather than purge Created April 27, 2016, 1:51 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: modules/web/manifests/server.pp
===================================================================
--- a/modules/web/manifests/server.pp
+++ b/modules/web/manifests/server.pp
@@ -36,17 +36,35 @@ class web::server(
},
}
class {'geoip':
cron => {hour => 0, minute => 8, monthday => 15},
ensure => $geoip ? {false => 'absent', default => 'present'},
}
- package {['python-jinja2', 'python-markdown']:}
+ ensure_packages(['python-pip'])
+
+ # Make sure that apt packages corresponding to the pip-installed modules below
+ # won't be installed unintentionally, these will take precedence otherwise.
+ package {['python-jinja2', 'python-markdown']:
+ ensure => 'held',
+ }
+
+ package {'Jinja2':
+ ensure => '2.8',
+ provider => 'pip',
+ require => [Package['python-pip'], Package['python-jinja2']],
+ }
+
+ package {'markdown':
+ ensure => '2.6.6',
+ provider => 'pip',
+ require => [Package['python-pip'], Package['python-markdown']],
+ }
nginx::hostconfig {$vhost:
content => template('web/site.conf.erb'),
global_config => template('web/global.conf.erb'),
is_default => $is_default,
certificate => $certificate ? {'undef' => undef, default => $certificate},
private_key => $private_key ? {'undef' => undef, default => $private_key},
log => "access_log_$vhost"
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld