Merge pull request #134 from apenney/apt
Switch to using puppetlabs-apt
This commit is contained in:
commit
741f5432b3
4 changed files with 42 additions and 17 deletions
31
Gemfile.lock
31
Gemfile.lock
|
@ -1,6 +1,7 @@
|
|||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
builder (3.2.2)
|
||||
diff-lcs (1.2.4)
|
||||
facter (1.7.1)
|
||||
hiera (1.2.1)
|
||||
|
@ -8,6 +9,7 @@ GEM
|
|||
highline (1.6.19)
|
||||
json (1.8.0)
|
||||
json_pure (1.8.0)
|
||||
kwalify (0.7.2)
|
||||
librarian (0.1.0)
|
||||
highline
|
||||
thor (~> 0.15)
|
||||
|
@ -19,6 +21,9 @@ GEM
|
|||
mime-types (1.23)
|
||||
mocha (0.14.0)
|
||||
metaclass (~> 0.0.1)
|
||||
net-scp (1.1.2)
|
||||
net-ssh (>= 2.6.5)
|
||||
net-ssh (2.6.8)
|
||||
nokogiri (1.5.9)
|
||||
puppet (3.2.1)
|
||||
facter (~> 1.6)
|
||||
|
@ -37,6 +42,10 @@ GEM
|
|||
rspec (>= 2.9.0)
|
||||
rspec-puppet (>= 0.1.1)
|
||||
rake (10.0.4)
|
||||
rbvmomi (1.6.0)
|
||||
builder
|
||||
nokogiri (>= 1.4.1)
|
||||
trollop
|
||||
rest-client (1.6.7)
|
||||
mime-types (>= 1.16)
|
||||
rgen (0.6.2)
|
||||
|
@ -50,7 +59,26 @@ GEM
|
|||
rspec-mocks (2.13.1)
|
||||
rspec-puppet (0.1.6)
|
||||
rspec
|
||||
rspec-system (2.2.0)
|
||||
kwalify (~> 0.7.2)
|
||||
net-scp (~> 1.1)
|
||||
net-ssh (~> 2.6)
|
||||
nokogiri (~> 1.5.9)
|
||||
rbvmomi (~> 1.6)
|
||||
rspec (~> 2.13)
|
||||
systemu (~> 2.5)
|
||||
rspec-system-puppet (2.2.0)
|
||||
rspec-system (~> 2.0)
|
||||
rspec-system-serverspec (1.0.0)
|
||||
rspec-system (~> 2.0)
|
||||
serverspec (~> 0.6.0)
|
||||
serverspec (0.6.3)
|
||||
highline
|
||||
net-ssh
|
||||
rspec (~> 2.0)
|
||||
systemu (2.5.2)
|
||||
thor (0.18.1)
|
||||
trollop (2.0)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
@ -63,3 +91,6 @@ DEPENDENCIES
|
|||
puppetlabs_spec_helper
|
||||
rake (>= 0.9.2.2)
|
||||
rspec-puppet (>= 0.1.3)
|
||||
rspec-system-puppet
|
||||
rspec-system-serverspec
|
||||
serverspec
|
||||
|
|
|
@ -8,3 +8,4 @@ description 'This module can be used for basic NGINX Management'
|
|||
project_page 'http://github.com/jfryman/puppet-nginx'
|
||||
|
||||
dependency 'puppetlabs/stdlib', '>= 0.1.6'
|
||||
dependency 'puppetlabs/apt', '>= 1.0.0'
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#
|
||||
# This class file is not called directly
|
||||
class nginx::package::debian {
|
||||
$operatingsystem_lowercase = inline_template('<%= @operatingsystem.downcase %>')
|
||||
$distro = downcase($::operatingsystem)
|
||||
|
||||
package { 'nginx':
|
||||
ensure => $nginx::package_ensure,
|
||||
|
@ -23,20 +23,13 @@ class nginx::package::debian {
|
|||
|
||||
anchor { 'nginx::apt_repo' : }
|
||||
|
||||
file { '/etc/apt/sources.list.d/nginx.list':
|
||||
ensure => present,
|
||||
content => "deb http://nginx.org/packages/${operatingsystem_lowercase}/ ${::lsbdistcodename} nginx
|
||||
deb-src http://nginx.org/packages/${operatingsystem_lowercase}/ ${::lsbdistcodename} nginx
|
||||
",
|
||||
mode => '0444',
|
||||
require => Exec['add_nginx_apt_key'],
|
||||
before => Anchor['nginx::apt_repo'],
|
||||
}
|
||||
include '::apt'
|
||||
|
||||
exec { 'add_nginx_apt_key':
|
||||
command => '/usr/bin/wget http://nginx.org/keys/nginx_signing.key -O - | /usr/bin/apt-key add -',
|
||||
unless => '/usr/bin/apt-key list | /bin/grep -q nginx',
|
||||
before => Anchor['nginx::apt_repo'],
|
||||
apt::source { 'nginx':
|
||||
location => "http://nginx.org/packages/${distro}",
|
||||
repos => 'nginx',
|
||||
key => '7BD9BF62',
|
||||
key_source => 'http://nginx.org/keys/nginx_signing.key',
|
||||
}
|
||||
|
||||
exec { 'apt_get_update_for_nginx':
|
||||
|
@ -44,7 +37,7 @@ class nginx::package::debian {
|
|||
timeout => 240,
|
||||
returns => [ 0, 100 ],
|
||||
refreshonly => true,
|
||||
subscribe => File['/etc/apt/sources.list.d/nginx.list'],
|
||||
subscribe => Apt::Source['nginx'],
|
||||
before => Anchor['nginx::apt_repo'],
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
# with nginx::resource::upstream
|
||||
# [*proxy_read_timeout*] - Override the default the proxy read timeout value of 90 seconds
|
||||
# [*fastcgi*] - location of fastcgi (host:port)
|
||||
# [*fastcgi_params*] - optional alternative fastcgi_params file to use
|
||||
# [*fastcgi_script*] - optional SCRIPT_FILE parameter
|
||||
# [*fastcgi_params*] - optional alternative fastcgi_params file to use
|
||||
# [*fastcgi_script*] - optional SCRIPT_FILE parameter
|
||||
# [*fastcgi_split_path*] - Allows settings of fastcgi_split_path_info so that you can split the script_name and path_info via regex
|
||||
# [*ssl*] - Indicates whether to setup SSL bindings for this location.
|
||||
# [*ssl_only*] - Required if the SSL and normal vHost have the same port.
|
||||
|
|
Loading…
Reference in a new issue