diff --git a/caos.ansible_roles/roles/docker_install/files/centos-extras-amd64.repo b/caos.ansible_roles/roles/docker_install/files/centos-extras-amd64.repo deleted file mode 100644 index 075a8d9..0000000 --- a/caos.ansible_roles/roles/docker_install/files/centos-extras-amd64.repo +++ /dev/null @@ -1,5 +0,0 @@ -[centos-extras] -name=Centos extras - $basearch -baseurl=http://mirror.centos.org/centos/7/extras/x86_64 -enabled=1 -gpgcheck=0 \ No newline at end of file diff --git a/caos.ansible_roles/roles/docker_install/files/centos-extras-arm64.repo b/caos.ansible_roles/roles/docker_install/files/centos-extras-arm64.repo deleted file mode 100644 index c224eb8..0000000 --- a/caos.ansible_roles/roles/docker_install/files/centos-extras-arm64.repo +++ /dev/null @@ -1,5 +0,0 @@ -[centos-extras] -name=Centos extras - $basearch -baseurl=https://mirrors.up.pt/pub/centos-altarch/7.9.2009/extras/aarch64/ -enabled=1 -gpgcheck=0 \ No newline at end of file diff --git a/caos.ansible_roles/roles/docker_install/tasks/install-docker-CentOS.yaml b/caos.ansible_roles/roles/docker_install/tasks/install-docker-CentOS.yaml index 01484c3..21801e8 100644 --- a/caos.ansible_roles/roles/docker_install/tasks/install-docker-CentOS.yaml +++ b/caos.ansible_roles/roles/docker_install/tasks/install-docker-CentOS.yaml @@ -6,22 +6,6 @@ state: present update_cache: yes -- name: ensure centos extras repository is deleted - ansible.builtin.file: - path: /etc/yum.repos.d/centos-extras.repo - state: absent - -- name: add centos extras repo (amd64) - copy: - src: centos-extras-amd64.repo - dest: /etc/yum.repos.d/centos-extras.repo - when: ansible_architecture == "x86_64" - -- name: add centos extras repo (arm64) - copy: - src: centos-extras-arm64.repo - dest: /etc/yum.repos.d/centos-extras.repo - when: ansible_architecture == "aarch64" - name: add docker repo shell: yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo @@ -36,4 +20,4 @@ state: present update_cache: yes -... \ No newline at end of file +... diff --git a/caos.ansible_roles/roles/docker_install/tasks/install-docker-RedHat.yaml b/caos.ansible_roles/roles/docker_install/tasks/install-docker-RedHat.yaml index 65e4416..d40d345 100644 --- a/caos.ansible_roles/roles/docker_install/tasks/install-docker-RedHat.yaml +++ b/caos.ansible_roles/roles/docker_install/tasks/install-docker-RedHat.yaml @@ -1,5 +1,23 @@ --- -- ansible.builtin.include_tasks: install-docker-CentOS.yaml +- name: install yum-utils + yum: + name: yum-utils + state: present + update_cache: yes + + +- name: add docker repo + shell: yum-config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo + +- name: install docker + yum: + name: + - docker-ce + - docker-ce-cli + - containerd.io + - docker-compose-plugin + state: present + update_cache: yes ...