Merge "Correct docker package on openEuler"
This commit is contained in:
commit
07b42a9c85
@ -1,6 +1,6 @@
|
||||
---
|
||||
# Whether to enable a package repository for Docker.
|
||||
enable_docker_repo: true
|
||||
enable_docker_repo: "{% if ansible_facts.distribution == 'openEuler' %}false{% else %}true{% endif %}"
|
||||
|
||||
# Docker APT repository configuration.
|
||||
docker_apt_url: "https://download.docker.com/linux/{{ ansible_facts.distribution | lower }}"
|
||||
@ -51,7 +51,7 @@ disable_firewall: True
|
||||
|
||||
docker_storage_driver: ""
|
||||
docker_custom_option: ""
|
||||
docker_custom_config: {}
|
||||
docker_custom_config: "{% if ansible_facts.distribution == 'openEuler' %}{\"exec-opts\": [\"native.umask=normal\"]}{% else %}{}{% endif %}"
|
||||
|
||||
docker_http_proxy: ""
|
||||
docker_https_proxy: ""
|
||||
@ -66,6 +66,10 @@ debian_pkg_install:
|
||||
- "{% if enable_multipathd|bool %}sg3-utils-udev{% endif %}"
|
||||
- "{% if not docker_disable_default_iptables_rules | bool %}iptables{% endif %}"
|
||||
|
||||
openeuler_pkg_install:
|
||||
- docker
|
||||
- python3-docker
|
||||
|
||||
redhat_pkg_install:
|
||||
- "{{ docker_yum_package }}"
|
||||
- git
|
||||
|
@ -90,7 +90,18 @@
|
||||
state: present
|
||||
update_cache: yes
|
||||
become: True
|
||||
when: ansible_facts.os_family == 'RedHat'
|
||||
when:
|
||||
- ansible_facts.os_family == 'RedHat'
|
||||
- ansible_facts.distribution != 'openEuler'
|
||||
register: rpm_install_result
|
||||
|
||||
- name: Install RPM packages for openEuler
|
||||
package:
|
||||
name: "{{ (openeuler_pkg_install | join(' ')).split() }}"
|
||||
state: present
|
||||
update_cache: yes
|
||||
become: True
|
||||
when: ansible_facts.distribution == 'openEuler'
|
||||
register: rpm_install_result
|
||||
|
||||
# If any packages were updated, and any containers were running, wait for the
|
||||
|
Loading…
x
Reference in New Issue
Block a user