12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- #
- # Cookbook:: workstation
- # Recipe:: _apt
- #
- # Copyright:: 2022, The Authors, All Rights Reserved.
- file '/etc/apt/sources.list' do
- action :delete
- end
- components_ = %w[main contrib non-free]
- # Main distribution
- apt_repository 'debian_testing' do
- arch 'amd64'
- uri 'http://deb.debian.org/debian/'
- distribution 'testing'
- components components_
- deb_src true
- action :add
- notifies :run, 'execute[UpdateDistribution]', :immediately
- end
- apt_repository 'debian_testing_updates' do
- arch 'amd64'
- uri 'http://deb.debian.org/debian/'
- distribution 'testing-updates'
- components components_
- deb_src true
- action :add
- end
- apt_repository 'debian_testing_security' do
- arch 'amd64'
- uri 'http://deb.debian.org/debian-security'
- distribution 'testing-security'
- components components_
- deb_src true
- action :add
- end
- apt_repository 'debian_testing_proposed_updates' do
- arch 'amd64'
- uri 'http://deb.debian.org/debian/'
- distribution 'testing-proposed-updates'
- components components_
- deb_src true
- action :add
- end
- # Stable in case package not found in testing
- apt_repository 'debian_stable' do
- arch 'amd64'
- uri 'http://deb.debian.org/debian/'
- distribution 'stable'
- components components_
- deb_src true
- action :add
- end
- # Apt configuration
- file '/etc/apt/apt.conf.d/01norecommend' do
- owner 'root'
- group 'root'
- mode '0644'
- content <<-_EOF.gsub(/^\s+/, '')
- APT::Install-Recommends "0";
- APT::Install-Suggests "0";
- _EOF
- end
- execute 'UpdateDistribution' do
- command '/usr/bin/apt-get dist-upgrade -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold"'
- environment ({ 'DEBIAN_FRONTEND' => 'noninteractive' })
- action :nothing
- end
|