Commit 22b50879 authored by nanahira's avatar nanahira

fix centos 8

parent 02a80445
Pipeline #2219 passed with stage
in 6 minutes and 49 seconds
...@@ -95,7 +95,13 @@ ...@@ -95,7 +95,13 @@
yum: yum:
name: docker-ce,docker-ce-cli,containerd.io name: docker-ce,docker-ce-cli,containerd.io
update_cache: yes update_cache: yes
when: ansible_os_family == 'RedHat' and ansible_distribution_major_version|int <= 8 when: ansible_os_family == 'RedHat' and ansible_distribution_major_version|int == 7
- name: 安装 Docker (dnf)
become: true
dnf:
name: docker-ce,docker-ce-cli,containerd.io
update_cache: yes
when: ansible_os_family == 'RedHat' and ansible_distribution_major_version|int >= 8 and ansible_distribution != 'Fedora'
notify: restart_docker notify: restart_docker
- name: 安装 Docker (Fedora) - name: 安装 Docker (Fedora)
become: true become: true
......
...@@ -30,6 +30,9 @@ ...@@ -30,6 +30,9 @@
- name: upgrade kernel - name: upgrade kernel
include_tasks: 'kernel/{{ansible_distribution}}.yml' include_tasks: 'kernel/{{ansible_distribution}}.yml'
when: (ansible_distribution == 'Debian' or ansible_distribution == 'CentOS') and ansible_virtualization_type != "docker" when: (ansible_distribution == 'Debian' or ansible_distribution == 'CentOS') and ansible_virtualization_type != "docker"
- name: redhat configures before reboot
include_tasks: redhat_configures.yml
when: ansible_os_family == 'RedHat'
- name: 系统源 重启 - name: 系统源 重启
become: true become: true
shell: reboot shell: reboot
......
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