diff --git a/roles/container-engine/docker/defaults/main.yml b/roles/container-engine/docker/defaults/main.yml index 616ddadd4..766041615 100644 --- a/roles/container-engine/docker/defaults/main.yml +++ b/roles/container-engine/docker/defaults/main.yml @@ -24,10 +24,7 @@ docker_dns_servers_strict: true docker_container_storage_setup: false -# Used to override obsoletes=0 -yum_conf: /etc/yum.conf yum_repo_dir: /etc/yum.repos.d -docker_yum_conf: /etc/yum_docker.conf # Fedora docker-ce repo docker_fedora_repo_base_url: 'https://download.docker.com/linux/fedora/{{ ansible_distribution_major_version }}/$basearch/stable' diff --git a/roles/container-engine/docker/tasks/main.yml b/roles/container-engine/docker/tasks/main.yml index 4d650a19e..1c624a9e6 100644 --- a/roles/container-engine/docker/tasks/main.yml +++ b/roles/container-engine/docker/tasks/main.yml @@ -144,28 +144,11 @@ - ansible_distribution in ["CentOS","RedHat"] and not is_ostree - yum_result.results | length == 0 -- name: Copy yum.conf for editing - copy: - src: "{{ yum_conf }}" - dest: "{{ docker_yum_conf }}" - remote_src: yes - when: ansible_distribution in ["CentOS","RedHat","OracleLinux"] and not is_ostree - -- name: Edit copy of yum.conf to set obsoletes=0 - ini_file: - path: "{{ docker_yum_conf }}" - section: main - option: obsoletes - value: "0" - no_extra_spaces: true - when: ansible_distribution in ["CentOS","RedHat","OracleLinux"] and not is_ostree - - name: ensure docker packages are installed action: "{{ docker_package_info.pkg_mgr }}" args: pkg: "{{ item.name }}" force: "{{ item.force|default(omit) }}" - conf_file: "{{ item.yum_conf|default(omit) }}" state: "{{ item.state | default('present') }}" update_cache: "{{ omit if ansible_distribution == 'Fedora' else True }}" enablerepo: "{{ item.repo | default(omit) }}" diff --git a/roles/container-engine/docker/vars/redhat.yml b/roles/container-engine/docker/vars/redhat.yml index 45e1ccb79..338356ce9 100644 --- a/roles/container-engine/docker/vars/redhat.yml +++ b/roles/container-engine/docker/vars/redhat.yml @@ -31,21 +31,16 @@ docker_selinux_versioned_pkg: docker_pkgs_use_docker_ce: - name: "{{ docker_selinux_versioned_pkg[docker_selinux_version | string] }}" - yum_conf: "{{ docker_yum_conf }}" repo: "docker-ce" - name: "{{ docker_versioned_pkg[docker_version | string] }}" - yum_conf: "{{ docker_yum_conf }}" repo: "docker-ce" docker_pkgs: - name: "{{ containerd_versioned_pkg[containerd_version | string] }}" - yum_conf: "{{ docker_yum_conf }}" repo: "docker-ce" - name: "{{ docker_cli_versioned_pkg[docker_cli_version | string] }}" - yum_conf: "{{ docker_yum_conf }}" repo: "docker-ce" - name: "{{ docker_versioned_pkg[docker_version | string] }}" - yum_conf: "{{ docker_yum_conf }}" repo: "docker-ce" docker_package_info: