vm-ansible/roles/docker/tasks/main.yaml
Kristóf Torma a53b27a8fd
Some checks reported errors
continuous-integration/drone/push Build was killed
replace usernames
2023-07-25 15:00:05 +02:00

38 lines
746 B
YAML

---
- name: "Install Docker via apt"
ansible.builtin.apt:
update_cache: yes
state: present
name:
- docker.io
- docker-compose
- name: Disable userland proxy
ansible.builtin.copy:
src: daemon.json
dest: /etc/docker/daemon.json
mode: 644
owner: root
group: backup
- name: Enable and restart Docker daemon
ansible.builtin.service:
name: docker
state: restarted
enabled: yes
- name: "Add service user to docker group"
ansible.builtin.user:
name: service-user@intra.tormakris.dev
comment: Service user
groups: docker
append: yes
- name: Allow docker exporter via ufw
community.general.ufw:
rule: allow
port: "4194"
proto: tcp
src: 192.168.69.0/24
...