mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-06-24 08:07:51 -02:30
Replace injected Ansible fact variables in container-engine role (#13296)
This commit is contained in:
@@ -46,7 +46,7 @@
|
||||
dpkg_selections:
|
||||
name: "{{ item }}"
|
||||
selection: install
|
||||
when: ansible_pkg_mgr == 'apt'
|
||||
when: ansible_facts['pkg_mgr'] == 'apt'
|
||||
changed_when: false
|
||||
with_items:
|
||||
- "{{ docker_packages_list }}"
|
||||
@@ -61,7 +61,7 @@
|
||||
- "{{ docker_packages_list }}"
|
||||
- "{{ containerd_package }}"
|
||||
when:
|
||||
- not ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
|
||||
- not ansible_facts['os_family'] in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
|
||||
- not is_ostree
|
||||
- docker_packages_list | length > 0
|
||||
|
||||
@@ -70,21 +70,21 @@
|
||||
repo: "{{ item }}"
|
||||
state: absent
|
||||
with_items: "{{ docker_repo_info.repos }}"
|
||||
when: ansible_pkg_mgr == 'apt'
|
||||
when: ansible_facts['pkg_mgr'] == 'apt'
|
||||
|
||||
- name: Docker | Remove docker repository on Fedora
|
||||
file:
|
||||
name: "{{ yum_repo_dir }}/docker.repo"
|
||||
state: absent
|
||||
when: ansible_distribution == "Fedora" and not is_ostree
|
||||
when: ansible_facts['distribution'] == "Fedora" and not is_ostree
|
||||
|
||||
- name: Docker | Remove docker repository on RedHat/CentOS/Oracle/AlmaLinux Linux
|
||||
file:
|
||||
name: "{{ yum_repo_dir }}/docker-ce.repo"
|
||||
state: absent
|
||||
when:
|
||||
- ansible_os_family == "RedHat"
|
||||
- ansible_distribution != "Fedora"
|
||||
- ansible_facts['os_family'] == "RedHat"
|
||||
- ansible_facts['distribution'] != "Fedora"
|
||||
- not is_ostree
|
||||
|
||||
- name: Docker | Remove docker configuration files
|
||||
|
||||
Reference in New Issue
Block a user