install nginx repo on debian and ubuntu for integration test

This commit is contained in:
Christoph Hartmann 2015-10-23 22:14:15 +02:00
parent b7a81f2208
commit 7080aaf346
3 changed files with 22 additions and 1 deletions

View 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

View file

@ -5,3 +5,4 @@
# prepare all operating systems with the required configuration
include_recipe('os_prepare::package')
include_recipe('os_prepare::apt')

View file

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