diff --git a/roles/coturn/tasks/main.yml b/roles/coturn/tasks/main.yml index 6254752..0d951bf 100644 --- a/roles/coturn/tasks/main.yml +++ b/roles/coturn/tasks/main.yml @@ -65,7 +65,14 @@ project_src: "{{ coturn_project_dir }}" recreate: never pull: true + debug: true when: docker_pull_images | bool + register: coturn_docker_compose_pull_result + +- name: Display pulled image(s) name + set_fact: + coturn_pulled_images: "{{ coturn_pulled_images | default([]) + [item.pulled_image.name] }}" + loop: "{{ coturn_docker_compose_pull_result['actions'] | default([]) | selectattr('pulled_image', 'defined') }}" - name: Create/Restart project services community.docker.docker_compose: diff --git a/roles/element/tasks/main.yml b/roles/element/tasks/main.yml index 286dc7d..43eaee5 100644 --- a/roles/element/tasks/main.yml +++ b/roles/element/tasks/main.yml @@ -25,7 +25,14 @@ project_src: "{{ element_project_dir }}" recreate: never pull: true + debug: true when: docker_pull_images | bool + register: element_docker_compose_pull_result + +- name: Display pulled image(s) name + set_fact: + element_pulled_images: "{{ element_pulled_images | default([]) + [item.pulled_image.name] }}" + loop: "{{ element_docker_compose_pull_result['actions'] | default([]) | selectattr('pulled_image', 'defined') }}" - name: Create/Restart project services community.docker.docker_compose: diff --git a/roles/etebase/tasks/update.yml b/roles/etebase/tasks/update.yml index 89c28ed..bd70730 100644 --- a/roles/etebase/tasks/update.yml +++ b/roles/etebase/tasks/update.yml @@ -37,11 +37,16 @@ when: docker_pull_images | bool register: etebase_docker_compose_pull_result +- name: Display pulled image(s) name + set_fact: + etebase_pulled_images: "{{ etebase_pulled_images | default([]) + [item.pulled_image.name] }}" + loop: "{{ etebase_docker_compose_pull_result['actions'] | default([]) | selectattr('pulled_image', 'defined') }}" + - name: Include backup tasks include_tasks: file: backup.yml # Make a backup if we didn't already make one and we pulled a new image - when: not run_backup and etebase_docker_compose_pull_result['actions'] | default([]) | selectattr('pulled_image', 'defined') | length > 0 + when: not run_backup and etebase_pulled_images is defined - name: Create/Restart project services community.docker.docker_compose: diff --git a/roles/hedgedoc/tasks/main.yml b/roles/hedgedoc/tasks/main.yml index d155760..ca70510 100644 --- a/roles/hedgedoc/tasks/main.yml +++ b/roles/hedgedoc/tasks/main.yml @@ -34,7 +34,14 @@ project_src: "{{ hedgedoc_project_dir }}" recreate: never pull: true + debug: true when: docker_pull_images | bool + register: hedgedoc_docker_compose_pull_result + +- name: Display pulled image(s) name + set_fact: + hedgedoc_pulled_images: "{{ hedgedoc_pulled_images | default([]) + [item.pulled_image.name] }}" + loop: "{{ hedgedoc_docker_compose_pull_result['actions'] | default([]) | selectattr('pulled_image', 'defined') }}" - name: Create/Restart project services community.docker.docker_compose: diff --git a/roles/homepage/tasks/main.yml b/roles/homepage/tasks/main.yml index ada6e2b..f0c8b1d 100644 --- a/roles/homepage/tasks/main.yml +++ b/roles/homepage/tasks/main.yml @@ -26,7 +26,14 @@ project_src: "{{ homepage_project_dir }}" recreate: never pull: true + debug: true when: docker_pull_images | bool + register: homepage_docker_compose_pull_result + +- name: Display pulled image(s) name + set_fact: + homepage_pulled_images: "{{ homepage_pulled_images | default([]) + [item.pulled_image.name] }}" + loop: "{{ homepage_docker_compose_pull_result['actions'] | default([]) | selectattr('pulled_image', 'defined') }}" - name: Create/Restart project services community.docker.docker_compose: diff --git a/roles/searxng/tasks/main.yml b/roles/searxng/tasks/main.yml index 452b0c6..ac1d947 100644 --- a/roles/searxng/tasks/main.yml +++ b/roles/searxng/tasks/main.yml @@ -26,7 +26,14 @@ project_src: "{{ searxng_project_dir }}" recreate: never pull: true + debug: true when: docker_pull_images | bool + register: searxng_docker_compose_pull_result + +- name: Display pulled image(s) name + set_fact: + searxng_pulled_images: "{{ searxng_pulled_images | default([]) + [item.pulled_image.name] }}" + loop: "{{ searxng_docker_compose_pull_result['actions'] | default([]) | selectattr('pulled_image', 'defined') }}" - name: Create/Restart project services community.docker.docker_compose: diff --git a/roles/synapse/tasks/update.yml b/roles/synapse/tasks/update.yml index e6f2fa1..0c4ab57 100644 --- a/roles/synapse/tasks/update.yml +++ b/roles/synapse/tasks/update.yml @@ -54,11 +54,16 @@ when: docker_pull_images | bool register: synapse_docker_compose_pull_result +- name: Display pulled image(s) name + set_fact: + synapse_pulled_images: "{{ synapse_pulled_images | default([]) + [item.pulled_image.name] }}" + loop: "{{ synapse_docker_compose_pull_result['actions'] | default([]) | selectattr('pulled_image', 'defined') }}" + - name: Include backup tasks include_tasks: file: backup.yml # Make a backup if we didn't already make one and we pulled a new image - when: not run_backup and synapse_docker_compose_pull_result['actions'] | default([]) | selectattr('pulled_image', 'defined') | length > 0 + when: not run_backup and synapse_pulled_images is defined - name: Create/Restart project services community.docker.docker_compose: diff --git a/roles/syncthing/tasks/main.yml b/roles/syncthing/tasks/main.yml index bb0e883..bc9bdfe 100644 --- a/roles/syncthing/tasks/main.yml +++ b/roles/syncthing/tasks/main.yml @@ -16,7 +16,14 @@ project_src: "{{ syncthing_project_dir }}" recreate: never pull: true + debug: true when: docker_pull_images | bool + register: syncthing_docker_compose_pull_result + +- name: Display pulled image(s) name + set_fact: + syncthing_pulled_images: "{{ syncthing_pulled_images | default([]) + [item.pulled_image.name] }}" + loop: "{{ syncthing_docker_compose_pull_result['actions'] | default([]) | selectattr('pulled_image', 'defined') }}" - name: Create/Restart project services community.docker.docker_compose: diff --git a/roles/vaultwarden/tasks/update.yml b/roles/vaultwarden/tasks/update.yml index a238636..d5ddb34 100644 --- a/roles/vaultwarden/tasks/update.yml +++ b/roles/vaultwarden/tasks/update.yml @@ -29,11 +29,16 @@ when: docker_pull_images | bool register: vaultwarden_docker_compose_pull_result +- name: Display pulled image(s) name + set_fact: + vaultwarden_pulled_images: "{{ vaultwarden_pulled_images | default([]) + [item.pulled_image.name] }}" + loop: "{{ vaultwarden_docker_compose_pull_result['actions'] | default([]) | selectattr('pulled_image', 'defined') }}" + - name: Include backup tasks include_tasks: file: backup.yml # Make a backup if we didn't already make one and we pulled a new image - when: not run_backup and vaultwarden_docker_compose_pull_result['actions'] | default([]) | selectattr('pulled_image', 'defined') | length > 0 + when: not run_backup and vaultwarden_pulled_images is defined - name: Create/Restart project services community.docker.docker_compose: