1
0
Fork 0
myserver-configuration/roles/whoami/tasks/base.yml
2023-06-11 00:21:25 +02:00

22 lines
551 B
YAML

---
- name: Check whoami directory exist
ansible.builtin.file:
path: whoami
state: directory
- name: Copy template conf
ansible.builtin.template:
src: "{{ item.src }}"
dest: "whoami/{{ item.dest }}"
loop:
- { src: 'docker-compose.yml.j2', dest: 'docker-compose.yml' }
register: whoami_copy_templates_results
- name: Force update and restart container
community.docker.docker_compose:
project_src: whoami
state: present
pull: true
restarted: "{{ whoami_copy_templates_results.changed }}"
become: true