2023-05-20 16:06:45 +02:00
|
|
|
---
|
|
|
|
|
|
|
|
- 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
|
2024-07-14 21:39:23 +02:00
|
|
|
community.docker.docker_compose_v2:
|
2023-05-20 16:06:45 +02:00
|
|
|
project_src: whoami
|
|
|
|
state: present
|
2024-07-14 21:39:23 +02:00
|
|
|
pull: always
|
2023-05-21 10:57:56 +02:00
|
|
|
restarted: "{{ whoami_copy_templates_results.changed }}"
|
2023-05-20 16:06:45 +02:00
|
|
|
become: true
|