Index: modules/nginx/manifests/init.pp |
=================================================================== |
--- a/modules/nginx/manifests/init.pp |
+++ b/modules/nginx/manifests/init.pp |
@@ -10,25 +10,44 @@ |
# the inclusion here became necessary. |
include ssh |
- apt::ppa {'ppa:nginx/stable': |
- } |
- |
- apt::source {'nginx': |
- ensure => 'absent', |
+ package {'nginx': |
+ ensure => 'latest', |
} |
- exec {'purge-nginx': |
- command => '/usr/bin/apt-get -y purge nginx', |
- logoutput => true, |
- path => '/usr/sbin:/usr/bin:/sbin:/bin', |
- refreshonly => true, |
- returns => [0, 100], |
- subscribe => Apt::Ppa['ppa:nginx/stable'], |
+ if $::lsbdistcodename == 'precise' { |
+ |
+ apt::ppa {'ppa:nginx/stable': |
+ } |
+ |
+ apt::source {'nginx': |
+ ensure => 'absent', |
+ } |
+ |
+ exec {'purge-nginx': |
+ before => Package['nginx'], |
+ command => '/usr/bin/apt-get -y purge nginx', |
+ logoutput => true, |
+ path => '/usr/sbin:/usr/bin:/sbin:/bin', |
+ refreshonly => true, |
+ returns => [0, 100], |
+ subscribe => Apt::Ppa['ppa:nginx/stable'], |
+ } |
} |
- package {'nginx': |
- ensure => '1.10.1-3+precise3', |
- require => Exec['purge-nginx'], |
+ if $::operatingsystem == 'Debian' { |
+ |
+ apt::key {'nginx': |
+ key => 'ABF5BD827BD9BF62', |
+ key_content => template('nginx/apt.key.erb'), |
+ } |
+ |
+ apt::source {'nginx': |
+ before => Package['nginx'], |
+ location => 'http://nginx.org/packages/mainline/debian/', |
Fred
2017/01/03 15:09:46
Since we added "apt-transport-https" in the Vagran
f.lopez
2017/01/03 16:34:24
Nice catch, ack
|
+ release => downcase($::lsbdistcodename), |
+ repos => 'nginx', |
+ require => Apt::Key['nginx'], |
+ } |
} |
user {'nginx': |