mirror of
https://github.com/inspec/inspec
synced 2024-11-27 07:00:39 +00:00
install nginx repo on debian and ubuntu for integration test
This commit is contained in:
parent
b7a81f2208
commit
7080aaf346
3 changed files with 22 additions and 1 deletions
20
test/integration/cookbooks/os_prepare/recipes/apt.rb
Normal file
20
test/integration/cookbooks/os_prepare/recipes/apt.rb
Normal file
|
@ -0,0 +1,20 @@
|
|||
# encoding: utf-8
|
||||
# author: Christoph Hartmann
|
||||
# author: Dominik Richter
|
||||
|
||||
# add nginx apt repository
|
||||
case node['platform']
|
||||
when 'ubuntu'
|
||||
include_recipe('apt')
|
||||
apt_repository 'nginx' do
|
||||
uri 'ppa:nginx/stable'
|
||||
distribution node['lsb']['codename']
|
||||
end
|
||||
when 'debian'
|
||||
include_recipe('apt')
|
||||
apt_repository 'nginx' do
|
||||
uri 'http://nginx.org/packages/debian'
|
||||
distribution node['lsb']['codename']
|
||||
components ['nginx']
|
||||
end
|
||||
end
|
|
@ -5,3 +5,4 @@
|
|||
# prepare all operating systems with the required configuration
|
||||
|
||||
include_recipe('os_prepare::package')
|
||||
include_recipe('os_prepare::apt')
|
||||
|
|
|
@ -15,7 +15,7 @@ when 'rhel', 'centos', 'fedora'
|
|||
# TODO: support DNF natively
|
||||
# Special care for fedora 22, since dnf is not officially supported yet
|
||||
# https://github.com/chef/chef/issues/3201
|
||||
if node['platform_version'] == 22
|
||||
if node['platform_version'] == '22'
|
||||
execute 'dnf install -y yum'
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue