updated ubuntu docker installation

This commit is contained in:
Radar231 2022-12-31 23:30:44 -05:00
parent 098139852d
commit 7efb625d3e
1 changed files with 14 additions and 8 deletions

View File

@ -24,11 +24,13 @@
- name: Ensure required supporting packages are installed (Ubuntu)
apt:
name:
- apt-transport-https
#- apt-transport-https
- ca-certificates
- curl
- gnupg-agent
- software-properties-common
- gnupg
- lsb-release
#- gnupg-agent
#- software-properties-common
state: present
when: ansible_distribution == "Ubuntu" or ansible_distribution == "Pop!_OS" or ansible_distribution == "Linux Mint"
@ -49,7 +51,8 @@
cmd: >
/usr/bin/curl -fsSL
https://download.docker.com/linux/ubuntu/gpg
| /usr/bin/apt-key add -
| gpg --dearmor -o /etc/apt/keyrings/docker.gpg
#| /usr/bin/apt-key add -
when: ansible_distribution == "Ubuntu" or ansible_distribution == "Pop!_OS" or ansible_distribution == "Linux Mint"
############################################################
@ -72,10 +75,12 @@
- name: Add the stable docker repository (Ubuntu)
shell:
cmd: >
/usr/bin/add-apt-repository
"deb https://download.docker.com/linux/ubuntu
{{ ansible_distribution_release }}
stable"
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
| sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
#/usr/bin/add-apt-repository
#"deb https://download.docker.com/linux/ubuntu
#{{ ansible_distribution_release }}
#stable"
when: ansible_distribution == "Ubuntu" or ansible_distribution == "Pop!_OS" or ansible_distribution == "Linux Mint"
############################################################
@ -99,6 +104,7 @@
- docker-ce
- docker-ce-cli
- containerd.io
- docker-compose-plugin
state: present
when: ansible_os_family == "Debian"