updated ubuntu docker installation
This commit is contained in:
parent
098139852d
commit
7efb625d3e
|
@ -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"
|
||||
|
||||
|
|
Loading…
Reference in New Issue