Commit 7b7dfae4 authored by nanahira's avatar nanahira

don't do yum things when python3

parent bd40b869
Pipeline #2866 passed with stage
in 6 minutes and 25 seconds
......@@ -66,7 +66,7 @@
yum:
name: docker-ce,docker-ce-cli,containerd.io
update_cache: yes
when: ansible_os_family == 'RedHat' and ansible_distribution_major_version|int == 7
when: ansible_os_family == 'RedHat' and ansible_distribution_major_version|int == 7 and ansible_python.version.major == 2
notify: restart_docker
- name: 安装 Docker (dnf)
become: true
......
......@@ -27,7 +27,7 @@
when: ansible_os_family == 'Debian'
- name: yum
include_tasks: yum.yml
when: ansible_os_family == 'RedHat' and ansible_distribution_major_version|int == 7
when: ansible_os_family == 'RedHat' and ansible_distribution_major_version|int == 7 and ansible_python.version.major == 2
- name: dnf
include_tasks: dnf.yml
when: ansible_os_family == 'RedHat' and ansible_distribution_major_version|int >= 8
......
......@@ -10,7 +10,7 @@
name: '*'
update_cache: true
state: latest
when: ansible_os_family == 'RedHat' and ansible_distribution_major_version|int == 7
when: ansible_os_family == 'RedHat' and ansible_distribution_major_version|int == 7 and ansible_python.version.major == 2
- name: dnf update
become: true
dnf:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment