Skip to content

Commit

Permalink
update installation of apt key for docker (#1754)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmgrady authored Nov 15, 2022
1 parent 511e0b2 commit 37c4327
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions deploy/ansible/roles/docker_install/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,27 @@
- apt-transport-https
- ca-certificates
- curl
- gnupg-agent
- software-properties-common
- gnupg
- lsb-release
state: present
notify: reboot target

- name: Create keyring directory
file:
path: /etc/apt/keyrings
state: directory
owner: root
group: root
mode: 0755

- name: Install Docker apt key
apt_key:
url: https://download.docker.com/linux/ubuntu/gpg
state: present
shell:
cmd: "curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg"
creates: /etc/apt/keyrings/docker.gpg

- name: Add Docker repository
apt_repository:
repo: "deb [arch=amd64] https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable"
repo: "deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable"
state: present
filename: docker

Expand Down

0 comments on commit 37c4327

Please sign in to comment.