diff --git a/test/integration/cookbooks/os_prepare/recipes/apt.rb b/test/integration/cookbooks/os_prepare/recipes/apt.rb new file mode 100644 index 000000000..8c783e2fc --- /dev/null +++ b/test/integration/cookbooks/os_prepare/recipes/apt.rb @@ -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 diff --git a/test/integration/cookbooks/os_prepare/recipes/default.rb b/test/integration/cookbooks/os_prepare/recipes/default.rb index 316e79549..c524f389e 100644 --- a/test/integration/cookbooks/os_prepare/recipes/default.rb +++ b/test/integration/cookbooks/os_prepare/recipes/default.rb @@ -5,3 +5,4 @@ # prepare all operating systems with the required configuration include_recipe('os_prepare::package') +include_recipe('os_prepare::apt') diff --git a/test/integration/cookbooks/os_prepare/recipes/package.rb b/test/integration/cookbooks/os_prepare/recipes/package.rb index 8d8c03ce7..766034bcf 100644 --- a/test/integration/cookbooks/os_prepare/recipes/package.rb +++ b/test/integration/cookbooks/os_prepare/recipes/package.rb @@ -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