From 27e75db4058c9ee2e8ee4bcc9b62aa7f4e4b5f33 Mon Sep 17 00:00:00 2001 From: Kienan Stewart Date: Wed, 14 Feb 2024 15:00:26 -0500 Subject: [PATCH] ansible: Support Ubuntu in docker role Change-Id: Ib68bfe59fc1c8da177ed1780876c01029478f1e8 Signed-off-by: Kienan Stewart --- automation/ansible/roles/docker/defaults/main.yml | 4 ++++ automation/ansible/roles/docker/tasks/setup-Debian.yml | 5 ++--- automation/ansible/roles/docker/vars/Ubuntu-24.yml | 4 ++++ 3 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 automation/ansible/roles/docker/vars/Ubuntu-24.yml diff --git a/automation/ansible/roles/docker/defaults/main.yml b/automation/ansible/roles/docker/defaults/main.yml index ea6986d..4959b97 100644 --- a/automation/ansible/roles/docker/defaults/main.yml +++ b/automation/ansible/roles/docker/defaults/main.yml @@ -17,3 +17,7 @@ docker_sles_products: docker_SLES_packages: - 'docker' + +docker_Ubuntu_packages: + - 'docker.io' + - 'docker-compose-v2' diff --git a/automation/ansible/roles/docker/tasks/setup-Debian.yml b/automation/ansible/roles/docker/tasks/setup-Debian.yml index b670181..386a27a 100644 --- a/automation/ansible/roles/docker/tasks/setup-Debian.yml +++ b/automation/ansible/roles/docker/tasks/setup-Debian.yml @@ -8,9 +8,8 @@ block: - name: Add upstream docker apt key ansible.builtin.apt_key: - url: 'https://download.docker.com/linux/debian/gpg' + url: "https://download.docker.com/linux/{{ansible_distribution|lower}}/gpg" - name: Add upstream docker sources - when: ansible_distribution == 'Debian' ansible.builtin.apt_repository: filename: 'docker' - repo: "deb https://download.docker.com/linux/debian {{ansible_distribution_release}} stable" + repo: "deb https://download.docker.com/linux/{{ansible_distribution|lower}} {{ansible_distribution_release}} stable" diff --git a/automation/ansible/roles/docker/vars/Ubuntu-24.yml b/automation/ansible/roles/docker/vars/Ubuntu-24.yml new file mode 100644 index 0000000..7ffcfd7 --- /dev/null +++ b/automation/ansible/roles/docker/vars/Ubuntu-24.yml @@ -0,0 +1,4 @@ +--- + +# Docker upstream doesn't yet have a repository for Ubuntu noble +docker_upstream: false -- 2.34.1