2022-01-01 19:24:52 +01:00
|
|
|
---
|
|
|
|
- name: "Install Docker via apt"
|
|
|
|
apt:
|
|
|
|
update_cache: yes
|
|
|
|
state: present
|
|
|
|
name:
|
|
|
|
- docker.io
|
|
|
|
- docker-compose
|
|
|
|
|
|
|
|
- name: Disable userland proxy
|
|
|
|
copy:
|
|
|
|
src: daemon.json
|
|
|
|
dest: /etc/docker/daemon.json
|
|
|
|
mode: 644
|
|
|
|
owner: root
|
2022-04-16 21:17:11 +02:00
|
|
|
group: backup
|
2022-01-01 19:24:52 +01:00
|
|
|
|
|
|
|
- name: Enable and restart Docker daemon
|
|
|
|
service:
|
|
|
|
name: docker
|
|
|
|
state: restarted
|
|
|
|
enabled: yes
|
2022-01-10 04:49:15 +01:00
|
|
|
|
2022-02-05 21:00:03 +01:00
|
|
|
- name: "Add service user to docker group"
|
|
|
|
ansible.builtin.user:
|
|
|
|
name: service-user
|
|
|
|
comment: Service user
|
|
|
|
groups: docker
|
|
|
|
append: yes
|
2022-05-29 15:15:02 +02:00
|
|
|
|
|
|
|
- name: Allow docker exporter via ufw
|
|
|
|
community.general.ufw:
|
|
|
|
rule: allow
|
2022-05-29 22:51:55 +02:00
|
|
|
port: "4194"
|
2022-05-29 15:15:02 +02:00
|
|
|
proto: tcp
|
|
|
|
src: 192.168.69.0/24
|
2022-04-16 19:55:29 +02:00
|
|
|
...
|