christianlempa-boilerplates/vagrant/hyperv/ubuntu/docker/playbook.yaml
2024-03-03 16:26:12 +01:00

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"