mirror of
https://github.com/ChristianLempa/boilerplates.git
synced 2024-11-29 03:33:28 +01:00
30 lines
820 B
YAML
30 lines
820 B
YAML
---
|
|
- hosts: all
|
|
become: true
|
|
tasks:
|
|
- name: install prerequisites
|
|
ansible.builtin.apt:
|
|
name:
|
|
- apt-transport-https
|
|
- ca-certificates
|
|
- curl
|
|
- gnupg-agent
|
|
- software-properties-common
|
|
update_cache: true
|
|
- name: add apt-key
|
|
ansible.builtin.apt_key:
|
|
url: https://download.docker.com/linux/ubuntu/gpg
|
|
- name: add docker repo
|
|
ansible.builtin.apt_repository:
|
|
repo: deb https://download.docker.com/linux/ubuntu focal stable
|
|
- name: install docker
|
|
ansible.builtin.apt:
|
|
name:
|
|
- docker-ce
|
|
- docker-ce-cli
|
|
- containerd.io
|
|
- docker-compose
|
|
update_cache: true
|
|
- name: add userpermissions
|
|
ansible.builtin.shell: "usermod -aG docker vagrant"
|