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" |