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 tasks
This commit is contained in:
parent
0d32c0d92b
commit
626ea64f66
2 changed files with 31 additions and 0 deletions
|
@ -95,6 +95,16 @@
|
||||||
- ansible_distribution == "Debian"
|
- ansible_distribution == "Debian"
|
||||||
- ansible_distribution_version == "10"
|
- 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
|
- name: Install cri-o packages
|
||||||
package:
|
package:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
|
@ -106,6 +116,17 @@
|
||||||
retries: 4
|
retries: 4
|
||||||
delay: "{{ retry_stagger | d(3) }}"
|
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
|
- name: Check if already installed
|
||||||
stat:
|
stat:
|
||||||
path: "/bin/crio"
|
path: "/bin/crio"
|
||||||
|
|
|
@ -81,6 +81,16 @@
|
||||||
tags:
|
tags:
|
||||||
- reset_crio
|
- 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
|
- name: CRI-O | Uninstall CRI-O package
|
||||||
package:
|
package:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
|
|
Loading…
Reference in a new issue