20 lines
383 B
YAML
20 lines
383 B
YAML
- name: Install Docker
|
|
apt:
|
|
name: ['docker.io', 'docker-compose']
|
|
state: present
|
|
update_cache: true
|
|
|
|
- name: Add users to docker group
|
|
user:
|
|
name: "{{ item }}"
|
|
groups: docker
|
|
append: true
|
|
loop: "{{ docker_users }}"
|
|
when: docker_users is defined
|
|
|
|
- name: Start Docker and enable on boot
|
|
service:
|
|
name: docker
|
|
state: started
|
|
enabled: true
|