Skip to content

Commit

Permalink
fix(ansible): use right arch for docker ubuntu
Browse files Browse the repository at this point in the history
Signed-off-by: Boris Glimcher <[email protected]>
  • Loading branch information
glimchb authored May 30, 2024
1 parent 9989371 commit 10b6ee5
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lab/ansible/setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,12 @@
https_proxy: "{{ 'http://192.168.0.1:3128' if inventory_hostname == 'mev' else '' }}"
tasks:
- ansible.builtin.package: state=present name=python3-pip,sshpass,git
- ansible.builtin.get_url: url=https://download.docker.com/linux/ubuntu/gpg dest=/etc/apt/keyrings/docker.asc mode='0644' force=true
when: ansible_os_family == 'Debian'
- ansible.builtin.apt_repository: state=present repo="deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable"
when: ansible_os_family == 'Debian'
- when: ansible_os_family == 'Debian'
block:
- ansible.builtin.get_url: url=https://download.docker.com/linux/ubuntu/gpg dest=/etc/apt/keyrings/docker.asc mode='0644' force=true
- ansible.builtin.shell: dpkg --print-architecture
register: deb_architecture
- ansible.builtin.apt_repository: state=present repo="deb [arch={{ deb_architecture.stdout}} signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable"
- ansible.builtin.package: state=absent name=docker.io,docker-doc,docker-compose,docker-compose-v2,podman-docker,containerd,runc
- ansible.builtin.package: state=present name=docker-ce,docker-ce-cli,containerd.io,docker-buildx-plugin,docker-compose-plugin
- ansible.builtin.systemd: state=started name=docker
Expand Down

0 comments on commit 10b6ee5

Please sign in to comment.