apt: Drop preferences (pinning) for backports
This commit is contained in:
parent
953ca015c5
commit
6fb3eefde9
|
@ -1,3 +0,0 @@
|
||||||
Package: *
|
|
||||||
Pin: release a=bookworm-backports
|
|
||||||
Pin-Priority: 50
|
|
|
@ -1,3 +0,0 @@
|
||||||
Package: *
|
|
||||||
Pin: release a=bullseye-backports
|
|
||||||
Pin-Priority: 50
|
|
|
@ -1,3 +0,0 @@
|
||||||
Package: *
|
|
||||||
Pin: release a=buster-backports
|
|
||||||
Pin-Priority: 50
|
|
|
@ -1,3 +0,0 @@
|
||||||
Package: *
|
|
||||||
Pin: release a=jessie-backports
|
|
||||||
Pin-Priority: 50
|
|
|
@ -1,3 +0,0 @@
|
||||||
Package: *
|
|
||||||
Pin: release a=stretch-backports
|
|
||||||
Pin-Priority: 50
|
|
|
@ -10,19 +10,9 @@
|
||||||
tags:
|
tags:
|
||||||
- apt
|
- apt
|
||||||
|
|
||||||
- name: Backports configuration
|
|
||||||
ansible.builtin.copy:
|
|
||||||
src: '{{ ansible_distribution_release }}_backports_preferences'
|
|
||||||
dest: /etc/apt/preferences.d/0-backports-defaults
|
|
||||||
force: true
|
|
||||||
mode: "0640"
|
|
||||||
register: apt_backports_config
|
|
||||||
tags:
|
|
||||||
- apt
|
|
||||||
|
|
||||||
- name: Apt update
|
- name: Apt update
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
when: apt_backports_sources is changed or apt_backports_config is changed
|
when: apt_backports_sources is changed
|
||||||
tags:
|
tags:
|
||||||
- apt
|
- apt
|
||||||
|
|
|
@ -17,16 +17,6 @@
|
||||||
tags:
|
tags:
|
||||||
- apt
|
- apt
|
||||||
|
|
||||||
- name: Backports configuration
|
|
||||||
ansible.builtin.copy:
|
|
||||||
src: '{{ ansible_distribution_release }}_backports_preferences'
|
|
||||||
dest: /etc/apt/preferences.d/0-backports-defaults
|
|
||||||
force: true
|
|
||||||
mode: "0640"
|
|
||||||
register: apt_backports_config
|
|
||||||
tags:
|
|
||||||
- apt
|
|
||||||
|
|
||||||
- name: Archived backport are accepted (jessie)
|
- name: Archived backport are accepted (jessie)
|
||||||
ansible.builtin.lineinfile:
|
ansible.builtin.lineinfile:
|
||||||
dest: '/etc/apt/apt.conf.d/99no-check-valid-until'
|
dest: '/etc/apt/apt.conf.d/99no-check-valid-until'
|
||||||
|
@ -42,4 +32,4 @@
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
tags:
|
tags:
|
||||||
- apt
|
- apt
|
||||||
when: apt_backports_list is changed or apt_backports_config is changed
|
when: apt_backports_list is changed
|
||||||
|
|
|
@ -8,10 +8,6 @@ describe file("/etc/apt/sources.list.d/backports.list") do
|
||||||
it { should be_file }
|
it { should be_file }
|
||||||
end
|
end
|
||||||
|
|
||||||
describe file("/etc/apt/preferences.d/0-backports-defaults") do
|
|
||||||
it { should be_file }
|
|
||||||
end
|
|
||||||
|
|
||||||
describe command("grep 'main contrib non-free' /etc/apt/sources.list.d/backports.list") do
|
describe command("grep 'main contrib non-free' /etc/apt/sources.list.d/backports.list") do
|
||||||
its(:stdout) { should_not be_empty }
|
its(:stdout) { should_not be_empty }
|
||||||
its(:exit_status) { should eq 0 }
|
its(:exit_status) { should eq 0 }
|
||||||
|
|
|
@ -8,10 +8,6 @@ set :backend, :exec
|
||||||
# it { should be_file }
|
# it { should be_file }
|
||||||
# end
|
# end
|
||||||
#
|
#
|
||||||
# describe file("/etc/apt/preferences.d/0-backports-defaults") do
|
|
||||||
# it { should be_file }
|
|
||||||
# end
|
|
||||||
#
|
|
||||||
# describe command("grep 'main contrib non-free' /etc/apt/sources.list.d/backports.list") do
|
# describe command("grep 'main contrib non-free' /etc/apt/sources.list.d/backports.list") do
|
||||||
# its(:stdout) { should_not be_empty }
|
# its(:stdout) { should_not be_empty }
|
||||||
# its(:exit_status) { should eq 0 }
|
# its(:exit_status) { should eq 0 }
|
||||||
|
|
Loading…
Reference in a new issue