support for nginx passenger debian repositories

This commit is contained in:
Tomas Barton 2013-09-27 14:48:51 +02:00
parent 315d7e109f
commit e3ce014354
3 changed files with 31 additions and 6 deletions

View file

@ -31,7 +31,9 @@
class nginx (
$worker_processes = $nginx::params::nx_worker_processes,
$worker_connections = $nginx::params::nx_worker_connections,
$package_name = $nginx::params::package_name,
$package_ensure = $nginx::params::package_ensure,
$package_source = $nginx::params::package_source,
$proxy_set_header = $nginx::params::nx_proxy_set_header,
$proxy_http_version = $nginx::params::nx_proxy_http_version,
$confd_purge = $nginx::params::nx_confd_purge,

View file

@ -16,7 +16,7 @@
class nginx::package::debian {
$distro = downcase($::operatingsystem)
package { 'nginx':
package { $nginx::package_name:
ensure => $nginx::package_ensure,
require => Anchor['nginx::apt_repo'],
}
@ -25,11 +25,31 @@ class nginx::package::debian {
include '::apt'
apt::source { 'nginx':
location => "http://nginx.org/packages/${distro}",
repos => 'nginx',
key => '7BD9BF62',
key_source => 'http://nginx.org/keys/nginx_signing.key',
case $nginx::package_source {
'nginx': {
apt::source { 'nginx':
location => "http://nginx.org/packages/${distro}",
repos => 'nginx',
key => '7BD9BF62',
key_source => 'http://nginx.org/keys/nginx_signing.key',
}
}
'passenger': {
if !defined( Package['apt-transport-https'] ) { package { 'apt-transport-https': ensure => present } }
apt::source { 'nginx':
location => 'https://oss-binaries.phusionpassenger.com/apt/passenger',
repos => "main",
key => '561F9B9CAC40B2F7',
key_source => 'https://oss-binaries.phusionpassenger.com/auto-software-signing-gpg-key.txt',
}
package { 'passenger':
ensure => 'present',
require => Anchor['nginx::apt_repo'],
}
}
default: {}
}
exec { 'apt_get_update_for_nginx':

View file

@ -88,5 +88,8 @@ class nginx::params {
$nx_nginx_error_log = "${nx_logdir}/error.log"
$nx_http_access_log = "${nx_logdir}/access.log"
# package name depends on distribution, e.g. for Debian nginx-full | nginx-light
$package_name = 'nginx'
$package_ensure = 'present'
$package_source = 'nginx'
}