Add ability to control the state of apt pins.
The default state is 'present', keeping the existing behaviour of the role. If 'apt_package_pinning_state' is set to 'absent' then the specified pin file will be removed. This functionality may be needed when removing an upstream repository configuration and associated pins in order to change back to using distro provided packages. Change-Id: I1f1adbef8f9d8cf787d00b6ef26b1acba2beb83e
This commit is contained in:
parent
599e5575d2
commit
3d52ce41d6
@ -15,3 +15,4 @@
|
||||
|
||||
apt_package_pinning_priority: 900
|
||||
apt_package_pinning_file_name: "openstack_pinned_packages.pref"
|
||||
apt_package_pinning_state: "present"
|
||||
|
@ -21,6 +21,14 @@
|
||||
when:
|
||||
- ansible_facts['pkg_mgr'] == 'apt'
|
||||
- apt_pinned_packages is defined
|
||||
- apt_package_pinning_state == 'present'
|
||||
tags:
|
||||
- apt-package-pinning
|
||||
- apt-install
|
||||
|
||||
- name: Remove apt pin preferences
|
||||
file:
|
||||
path: "/etc/apt/preferences.d/{{ apt_package_pinning_file_name }}"
|
||||
state: absent
|
||||
when:
|
||||
- apt_package_pinning_state == 'absent'
|
||||
|
Loading…
Reference in New Issue
Block a user