Merge "Correct docker package on openEuler"

This commit is contained in:
Zuul 2022-03-30 08:11:07 +00:00 committed by Gerrit Code Review
commit 07b42a9c85
2 changed files with 18 additions and 3 deletions

View File

@ -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

View File

@ -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