mirror of
https://github.com/ChristianLempa/boilerplates.git
synced 2024-11-29 19:53:48 +01:00
39 lines
897 B
YAML
39 lines
897 B
YAML
---
|
|
- name: Install Docker
|
|
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 user vagrant to group docker
|
|
ansible.builtin.user:
|
|
name: vagrant
|
|
groups: docker
|
|
append: true
|