Created
February 26, 2021 16:44
-
-
Save psct/166f4cc7770adcd660ae901e28dfcde1 to your computer and use it in GitHub Desktop.
Debian add docker repository and gpg key and install docker-ce (just for amd64)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: set up docker & compose | |
hosts: docker | |
become: yes | |
tasks: | |
- name: update package index | |
apt: | |
name: "*" | |
state: latest | |
update_cache: yes | |
force_apt_get: yes | |
- name: add packages | |
apt: | |
name: "{{ packagesdep }}" | |
update_cache: yes | |
force_apt_get: yes | |
state: latest | |
vars: | |
packagesdep: | |
- apt-transport-https | |
- ca-certificates | |
- curl | |
- gnupg-agent | |
- software-properties-common | |
- name: add docker signing key | |
apt_key: | |
url: https://download.docker.com/linux/debian/gpg | |
state: present | |
- name: add docker repository | |
apt_repository: | |
repo: deb [arch=amd64] https://download.docker.com/linux/debian buster stable | |
state: present | |
- name: update package index | |
apt: | |
name: "*" | |
state: latest | |
update_cache: yes | |
force_apt_get: yes | |
- name: install docker | |
apt: | |
name: "docker-ce" | |
state: latest |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment