mirror of
https://github.com/ChristianLempa/boilerplates.git
synced 2024-11-25 09:44:24 +01:00
8a17193dd0
This makes text files compliant to POSIX which requires every line of a text file to end with a newline character [1][2]. [1] https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_403 [2] https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
35 lines
990 B
YAML
35 lines
990 B
YAML
---
|
|
- name: install docker
|
|
hosts: "{{ hosts }}"
|
|
become: yes
|
|
tasks:
|
|
- name: install docker dependencies
|
|
apt:
|
|
name:
|
|
- apt-transport-https
|
|
- ca-certificates
|
|
- curl
|
|
- gnupg-agent
|
|
- software-properties-common
|
|
update_cache: yes
|
|
- name: add docker gpg key
|
|
apt_key:
|
|
url: https://download.docker.com/linux/ubuntu/gpg
|
|
state: present
|
|
keyring: /etc/apt/keyrings/docker.gpg
|
|
- name: add docker repository
|
|
apt_repository:
|
|
filename: docker
|
|
repo: deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu {{ ansible_lsb.codename|lower }} stable
|
|
state: present
|
|
- name: install docker engine
|
|
apt:
|
|
name:
|
|
- docker-ce
|
|
- docker-ce-cli
|
|
- containerd.io
|
|
- docker-buildx-plugin
|
|
- docker-scan-plugin
|
|
- docker-compose-plugin
|
|
update_cache: yes
|