christianlempa-boilerplates/vagrant/hyperv/ubuntu/docker/playbook.yaml
Christoph Schug 24b0819e7f fix: add missing names
Any play or task should have a name.
2024-03-03 16:43:55 +01:00

36 lines
848 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 userpermissions
ansible.builtin.shell: "usermod -aG docker vagrant"