inspec/test/cookbooks/os_prepare/recipes/apt.rb
Tim Smith 4b3095dac2 Further modernize the cookbook and remove legacy setup
Remove container setup that comes for free with the dokken containers now
Use the new openssl resource names
Remove all the encoding statements that even rubocop doesn't recommend anymore
Remove some compatibility with centos-5 and ubuntu 15.10

Signed-off-by: Tim Smith <tsmith@chef.io>
2019-02-13 21:50:33 -08:00

35 lines
879 B
Ruby

# author: Christoph Hartmann
# author: Dominik Richter
# add nginx apt repository
case node['platform']
when 'ubuntu'
# use ppa
apt_repository 'nginx' do
uri 'ppa:nginx/stable'
distribution node['lsb']['codename']
end
apt_repository 'chef-stable' do
uri 'https://packages.chef.io/stable-apt'
key 'https://downloads.chef.io/packages-chef-io-public.key'
distribution node['lsb']['codename']
components ['main']
trusted true
end
when 'debian'
# use plain repo
apt_repository 'nginx' do
uri 'http://nginx.org/packages/debian'
distribution node['lsb']['codename']
components ['nginx']
end
apt_repository 'chef-stable' do
uri 'https://packages.chef.io/stable-apt'
key 'https://downloads.chef.io/packages-chef-io-public.key'
distribution node['lsb']['codename']
components ['main']
trusted true
end
end