Refactor Update or create container

This commit is contained in:
Florian RICHER 2023-05-21 10:57:56 +02:00
parent 49a6a3f712
commit ede7570e68
7 changed files with 13 additions and 76 deletions

View file

@ -32,19 +32,10 @@
msg: Please run init.sh in protonmail folder and set variable protonmail.initialized to true and restart tasks
when: not protonmail.initialized
- name: Force update and restart container
- name: Update and restart container
community.docker.docker_compose:
project_src: protonmail
state: present
pull: true
restarted: true
when: protonmail.initialized and (protonmail_copy_templates_results.changed or protonmail_copy_files_results.changed)
restarted: "{{ protonmail.initialized and (protonmail_copy_templates_results.changed or protonmail_copy_files_results.changed) }}"
become: true
- name: Update or start container
community.docker.docker_compose:
project_src: protonmail
state: present
pull: true
when: protonmail.initialized and not protonmail_copy_templates_results.changed and not protonmail_copy_files_results.changed
become: true