9052 crio add dpkg hold (#9075)
* Update main.yaml * remove version in dpkg_selection name * make lint happy * Fix typo * add comment / remove useless contition * remove dpkg hold in reset taskspull/9101/head
parent
0d32c0d92b
commit
626ea64f66
|
@ -95,6 +95,16 @@
|
|||
- ansible_distribution == "Debian"
|
||||
- ansible_distribution_version == "10"
|
||||
|
||||
- name: Remove dpkg hold
|
||||
dpkg_selections:
|
||||
name: "{{ item | split ('=') | first }}"
|
||||
selection: install
|
||||
when:
|
||||
- ansible_pkg_mgr == 'apt'
|
||||
changed_when: false
|
||||
with_items:
|
||||
- "{{ crio_packages }}"
|
||||
|
||||
- name: Install cri-o packages
|
||||
package:
|
||||
name: "{{ item }}"
|
||||
|
@ -106,6 +116,17 @@
|
|||
retries: 4
|
||||
delay: "{{ retry_stagger | d(3) }}"
|
||||
|
||||
# This is required to ensure any apt upgrade will not break kubernetes
|
||||
- name: Tell Debian hosts not to change the cri-o version with apt upgrade
|
||||
dpkg_selections:
|
||||
name: "{{ item | split ('=') | first }}"
|
||||
selection: hold
|
||||
when:
|
||||
- ansible_pkg_mgr == 'apt'
|
||||
changed_when: false
|
||||
with_items:
|
||||
- "{{ crio_packages }}"
|
||||
|
||||
- name: Check if already installed
|
||||
stat:
|
||||
path: "/bin/crio"
|
||||
|
|
|
@ -81,6 +81,16 @@
|
|||
tags:
|
||||
- reset_crio
|
||||
|
||||
- name: CRI-O | Remove dpkg hold
|
||||
dpkg_selections:
|
||||
name: "{{ item }}"
|
||||
selection: install
|
||||
when: ansible_pkg_mgr == 'apt'
|
||||
changed_when: false
|
||||
with_items: "{{ crio_packages }}"
|
||||
tags:
|
||||
- reset_crio
|
||||
|
||||
- name: CRI-O | Uninstall CRI-O package
|
||||
package:
|
||||
name: "{{ item }}"
|
||||
|
|
Loading…
Reference in New Issue