Skip to content

Commit

Permalink
Replace set_fact with inline templated conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewJDawes committed Jun 30, 2024
1 parent 2c5c37e commit 98a8240
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions tests/integration/targets/setup_docker/tasks/Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,9 @@
- 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={{ docker_arch }}] https://download.docker.com/linux/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} stable
repo: deb [arch={{ 'arm64' if ansible_architecture == 'aarch64' else 'amd64' }}] https://download.docker.com/linux/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} stable
state: present

- block:
Expand Down

0 comments on commit 98a8240

Please sign in to comment.