From 3c575b840975946dc559c4be1fc998dd57bc6e23 Mon Sep 17 00:00:00 2001 From: Kienan Stewart Date: Wed, 28 Feb 2024 08:49:15 -0500 Subject: [PATCH] ansible: Add Rocky Linux support to docker role Change-Id: Ibed5027bfd39606fe5d6cab798fb7ef08bc004c6 Signed-off-by: Kienan Stewart --- automation/ansible/roles/docker/defaults/main.yml | 3 +++ .../ansible/roles/docker/tasks/setup-RedHat.yml | 11 +++++++++++ automation/ansible/roles/docker/vars/RedHat.yml | 2 ++ 3 files changed, 16 insertions(+) create mode 100644 automation/ansible/roles/docker/tasks/setup-RedHat.yml create mode 100644 automation/ansible/roles/docker/vars/RedHat.yml diff --git a/automation/ansible/roles/docker/defaults/main.yml b/automation/ansible/roles/docker/defaults/main.yml index 4959b97..3a25299 100644 --- a/automation/ansible/roles/docker/defaults/main.yml +++ b/automation/ansible/roles/docker/defaults/main.yml @@ -21,3 +21,6 @@ docker_SLES_packages: docker_Ubuntu_packages: - 'docker.io' - 'docker-compose-v2' + +# Rocky Linux doesn't provide packages for docker +docker_Rocky_packages: [] diff --git a/automation/ansible/roles/docker/tasks/setup-RedHat.yml b/automation/ansible/roles/docker/tasks/setup-RedHat.yml new file mode 100644 index 0000000..f35ac6a --- /dev/null +++ b/automation/ansible/roles/docker/tasks/setup-RedHat.yml @@ -0,0 +1,11 @@ +--- +- ansible.builtin.set_fact: + docker_packages: "{{docker_upstream_packages}}" + docker_upstream: true +- ansible.builtin.yum_repository: + name: docker + description: 'Docker CE Stable - $basearch' + baseurl: 'https://download.docker.com/linux/centos/$releasever/$basearch/stable' + enabled: true + gpgcheck: true + gpgkey: 'https://download.docker.com/linux/centos/gpg' diff --git a/automation/ansible/roles/docker/vars/RedHat.yml b/automation/ansible/roles/docker/vars/RedHat.yml new file mode 100644 index 0000000..cd21505 --- /dev/null +++ b/automation/ansible/roles/docker/vars/RedHat.yml @@ -0,0 +1,2 @@ +--- + -- 2.34.1