From 2c5c37e55229819edf1c2416ee9ab23afddc27ed Mon Sep 17 00:00:00 2001 From: Andrew Dawes Date: Sat, 29 Jun 2024 22:07:41 +0000 Subject: [PATCH] Support ansible-test integration for arm64 --- .../targets/setup_docker/tasks/Debian.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tests/integration/targets/setup_docker/tasks/Debian.yml b/tests/integration/targets/setup_docker/tasks/Debian.yml index 0b5bdcb1a..8495aa48a 100644 --- a/tests/integration/targets/setup_docker/tasks/Debian.yml +++ b/tests/integration/targets/setup_docker/tasks/Debian.yml @@ -17,9 +17,22 @@ - name: Add gpg key shell: curl -fsSL https://download.docker.com/linux/{{ ansible_distribution | lower }}/gpg >key && apt-key add key +- name: Debug architecture + debug: + msg: '{{ ansible_architecture }}' + +- name: Set default arch amd64 for Docker repo + set_fact: + docker_arch: amd64 + +- name: Set arch arm64 for Docker repo when on aarch64 + set_fact: + docker_arch: arm64 + when: ansible_architecture == 'aarch64' + - name: Add Docker repo apt_repository: - repo: deb [arch=amd64] https://download.docker.com/linux/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} stable + repo: deb [arch={{ docker_arch }}] https://download.docker.com/linux/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} stable state: present - block: