From 1f5daf1965a41f77193b9bcdba63ddb4e1e964b0 Mon Sep 17 00:00:00 2001 From: nono Date: Wed, 16 Oct 2024 19:15:08 +0000 Subject: [PATCH] Ajouter tasks/setup-redhat.yml --- tasks/setup-redhat.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 tasks/setup-redhat.yml diff --git a/tasks/setup-redhat.yml b/tasks/setup-redhat.yml new file mode 100644 index 0000000..7448c56 --- /dev/null +++ b/tasks/setup-redhat.yml @@ -0,0 +1,31 @@ +--- +- name: Ensure old versions of Docker are not installed. + package: + name: + - docker-ce + - docker-ce-cli + - containerd.io + - docker-buildx-plugin + - docker-compose-plugin + state: absent + +- name: Install yum-utils package. + package: + name: + - yum-utils + state: present + +- name: Add docker-ce repository via yum-config-manager. + shell: yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo + args: + creates: /etc/yum.repos.d/docker-ce.repo + +- name: Install docker-ce packages. + package: + name: + - docker-ce + - docker-ce-cli + - containerd.io + - docker-buildx-plugin + - docker-compose-plugin + state: present \ No newline at end of file