Configure docker

This commit is contained in:
Roberto Alsina 2024-06-26 13:58:25 -03:00
parent 8622ec646f
commit 81a0ce0248

View File

@ -12,6 +12,7 @@
- btrfs-progs
state: present
- name: Start and enable service docker
become: true
ansible.builtin.service:
name: docker
state: started
@ -22,3 +23,22 @@
name: ralsina
groups: docker
append: true
- name: Configure Docker
become: true
ansible.builtin.copy:
dest: /etc/docker/daemon.json
mode: '0644'
content: |
{
"data-root": "/data/docker"
}
notify:
- Restart Docker
handlers:
- name: Restart Docker
become: true
ansible.builtin.service:
name: docker
state: restarted