1
0
Fork 0
myserver-configuration/roles/watchtower/tasks/base.yml

20 lines
466 B
YAML

---
- name: Check watchtower directory exist
ansible.builtin.file:
path: watchtower
state: directory
- name: Copy template conf
ansible.builtin.template:
src: "{{ item.src }}"
dest: "watchtower/{{ item.dest }}"
loop:
- { src: 'docker-compose.yml', dest: 'docker-compose.yml' }
- name: Force update and restart container
community.docker.docker_compose_v2:
project_src: watchtower
state: present
pull: always
become: true