Paul Brinkmeier 06b673ec89
Some checks failed
continuous-integration/drone/push Build is failing
Apply ansible-lint fixes
2023-06-09 00:42:43 +02:00

51 lines
1.3 KiB
YAML

---
- name: Install Docker installation prerequisites
become: true
ansible.builtin.apt:
update_cache: true
# Don't upgrade, only make sure that the packages are present
# state: latest
name:
- ca-certificates
- curl
- gnupg
- lsb-release
- name: Retrieve Docker GPG key
check_mode: false
ansible.builtin.uri:
url: https://download.docker.com/linux/debian/gpg
return_content: true
register: docker_gpg_key
- name: Install Docker GPG key
become: true
ansible.builtin.command: "gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg"
args:
stdin: "{{ docker_gpg_key.content }}"
creates: /usr/share/keyrings/docker-archive-keyring.gpg
- name: Retrieve dpkg architecture
check_mode: false
ansible.builtin.command: dpkg --print-architecture
register: docker_dpkg_architecture
changed_when: false
- name: Add Docker apt repository
become: true
ansible.builtin.template:
src: docker.list.j2
dest: /etc/apt/sources.list.d/docker.list
mode: "u=rw,g=r,o=r"
- name: Install Docker
become: true
ansible.builtin.apt:
update_cache: true
# Don't upgrade, only make sure that the packages are present
# state: latest
name:
- docker-ce
- docker-ce-cli
- containerd.io