containerd: use copy to set apt pin
Signed-off-by: Etienne Champetier <champetier.etienne@gmail.com>
(cherry picked from commit 19a61d838f
)
This commit is contained in:
parent
803f89e82b
commit
74e8f58c57
2 changed files with 6 additions and 8 deletions
|
@ -81,14 +81,15 @@
|
||||||
|
|
||||||
# This is required to ensure any apt upgrade will not break kubernetes
|
# This is required to ensure any apt upgrade will not break kubernetes
|
||||||
- name: Set containerd pin priority to apt_preferences on Debian family
|
- name: Set containerd pin priority to apt_preferences on Debian family
|
||||||
template:
|
copy:
|
||||||
src: "apt_preferences.d/debian_containerd.j2"
|
content: |
|
||||||
|
Package: {{ containerd_package }}
|
||||||
|
Pin: version {{ containerd_version }}*
|
||||||
|
Pin-Priority: 1001
|
||||||
dest: "/etc/apt/preferences.d/containerd"
|
dest: "/etc/apt/preferences.d/containerd"
|
||||||
owner: "root"
|
owner: "root"
|
||||||
mode: 0644
|
mode: 0644
|
||||||
when:
|
when: ansible_pkg_mgr == 'apt'
|
||||||
- ansible_os_family in ['Ubuntu', 'Debian']
|
|
||||||
- not is_ostree
|
|
||||||
|
|
||||||
- name: ensure containerd packages are installed
|
- name: ensure containerd packages are installed
|
||||||
action: "{{ containerd_package_info.pkg_mgr }}"
|
action: "{{ containerd_package_info.pkg_mgr }}"
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
Package: {{ containerd_package }}
|
|
||||||
Pin: version {{ containerd_version }}*
|
|
||||||
Pin-Priority: 1001
|
|
Loading…
Reference in a new issue