Split image(s) pulling & container(s) recreation for better clarity.

This commit is contained in:
Viyurz 2024-02-23 14:35:09 +01:00
parent 93c291289c
commit c4ea834bf6
Signed by: Viyurz
SSH key fingerprint: SHA256:IskOHTmhHSJIvAt04N6aaxd5SZCVWW1Guf9tEcxIMj8
6 changed files with 48 additions and 12 deletions

View file

@ -60,9 +60,15 @@
mode: '640'
become: true
- name: Pull/Create/Restart project services
- name: Pull project services
community.docker.docker_compose:
project_src: "{{ coturn_project_dir }}"
recreate: never
pull: true
when: docker_pull_images | bool
- name: Create/Restart project services
community.docker.docker_compose:
project_src: "{{ coturn_project_dir }}"
pull: "{{ docker_pull_images | bool }}"
# Restart if config file(s) changed
restarted: "{{ coturn_template_turnserver_result['changed'] | bool }}"

View file

@ -20,9 +20,15 @@
mode: '644'
register: element_template_config_result
- name: Pull/Create/Restart project services
- name: Pull project services
community.docker.docker_compose:
project_src: "{{ element_project_dir }}"
recreate: never
pull: true
when: docker_pull_images | bool
- name: Create/Restart project services
community.docker.docker_compose:
project_src: "{{ element_project_dir }}"
pull: "{{ docker_pull_images | bool }}"
# Restart if config file(s) changed
restarted: "{{ element_template_config_result['changed'] | bool }}"

View file

@ -29,7 +29,13 @@
mode: '770'
become: true
- name: Pull/Create/Restart project services
- name: Pull project services
community.docker.docker_compose:
project_src: "{{ hedgedoc_project_dir }}"
recreate: never
pull: true
when: docker_pull_images | bool
- name: Create/Restart project services
community.docker.docker_compose:
project_src: "{{ hedgedoc_project_dir }}"
pull: "{{ docker_pull_images | bool }}"

View file

@ -21,9 +21,15 @@
# Store result to restart services if the file(s) changed
register: homepage_copy_files_result
- name: Pull/Create/Restart project services
- name: Pull project services
community.docker.docker_compose:
project_src: "{{ homepage_project_dir }}"
recreate: never
pull: true
when: docker_pull_images | bool
- name: Create/Restart project services
community.docker.docker_compose:
project_src: "{{ homepage_project_dir }}"
pull: "{{ docker_pull_images | bool }}"
# Restart if config file(s) changed
restarted: "{{ homepage_copy_files_result['changed'] | bool }}"

View file

@ -21,9 +21,15 @@
# Store result to restart services if the file(s) changed
register: searxng_copy_files_result
- name: Pull/Create/Restart project services
- name: Pull project services
community.docker.docker_compose:
project_src: "{{ searxng_project_dir }}"
recreate: never
pull: true
when: docker_pull_images | bool
- name: Create/Restart project services
community.docker.docker_compose:
project_src: "{{ searxng_project_dir }}"
pull: "{{ docker_pull_images | bool }}"
# Restart if config file(s) changed
restarted: "{{ searxng_copy_files_result['changed'] | bool }}"

View file

@ -11,7 +11,13 @@
group: "{{ ansible_env['USER'] }}"
mode: '640'
- name: Pull/Create/Restart project services
- name: Pull project services
community.docker.docker_compose:
project_src: "{{ syncthing_project_dir }}"
recreate: never
pull: true
when: docker_pull_images | bool
- name: Create/Restart project services
community.docker.docker_compose:
project_src: "{{ syncthing_project_dir }}"
pull: "{{ docker_pull_images | bool }}"