1
0
mirror of https://github.com/spantaleev/matrix-docker-ansible-deploy.git synced 2024-12-12 08:43:55 +02:00

Don't delete Docker images which may have been pulled by another

Some people run Coturn or Jitsi, etc., by themselves and disable it
in the playbook.

Because the playbook is trying to be nice and clean up after itself,
it was deleting these Docker images.

However, people wish to pull and use them separately and would rather
they don't get deleted.

We could make this configurable for the sake of this special case, but
it's simpler to just avoid deleting these images.
It's not like this "cleaning things up" thing works anyway.
As time goes on, the playbook gets updated with newer image tags
and we leave so many images behind. If one doesn't run
`docker system prune -a` manually once in a while, they'd get swamped
with images anyway. Whether we leave a few images behind due to the lack
of this cleanup now is pretty much irrelevant.
This commit is contained in:
Slavi Pantaleev 2021-01-23 14:01:27 +02:00
parent f085362149
commit 1cd251ed78
6 changed files with 14 additions and 24 deletions

View File

@ -41,7 +41,5 @@
path: "{{ matrix_coturn_base_path }}" path: "{{ matrix_coturn_base_path }}"
state: absent state: absent
- name: Ensure coturn Docker image doesn't exist # Intentionally not removing the Docker image when uninstalling.
docker_image: # We can't be sure it had been pulled by us in the first place.
name: "{{ matrix_coturn_docker_image }}"
state: absent

View File

@ -22,3 +22,6 @@
service: service:
daemon_reload: yes daemon_reload: yes
when: "matrix_dynamic_dns_service_stat.stat.exists" when: "matrix_dynamic_dns_service_stat.stat.exists"
# Intentionally not removing the Docker image when uninstalling.
# We can't be sure it had been pulled by us in the first place.

View File

@ -89,8 +89,5 @@
state: absent state: absent
when: "not matrix_jitsi_enabled|bool" when: "not matrix_jitsi_enabled|bool"
- name: Ensure jitsi-jicofo Docker image doesn't exist # Intentionally not removing the Docker image when uninstalling.
docker_image: # We can't be sure it had been pulled by us in the first place.
name: "{{ matrix_jitsi_jicofo_docker_image }}"
state: absent
when: "not matrix_jitsi_enabled|bool"

View File

@ -89,8 +89,5 @@
state: absent state: absent
when: "not matrix_jitsi_enabled|bool" when: "not matrix_jitsi_enabled|bool"
- name: Ensure jitsi-jvb Docker image doesn't exist # Intentionally not removing the Docker image when uninstalling.
docker_image: # We can't be sure it had been pulled by us in the first place.
name: "{{ matrix_jitsi_jvb_docker_image }}"
state: absent
when: "not matrix_jitsi_enabled|bool"

View File

@ -80,8 +80,5 @@
state: absent state: absent
when: "not matrix_jitsi_enabled|bool" when: "not matrix_jitsi_enabled|bool"
- name: Ensure jitsi-prosody Docker image doesn't exist # Intentionally not removing the Docker image when uninstalling.
docker_image: # We can't be sure it had been pulled by us in the first place.
name: "{{ matrix_jitsi_prosody_docker_image }}"
state: absent
when: "not matrix_jitsi_enabled|bool"

View File

@ -90,8 +90,6 @@
state: absent state: absent
when: "not matrix_jitsi_enabled|bool" when: "not matrix_jitsi_enabled|bool"
- name: Ensure jitsi-web Docker image doesn't exist # Intentionally not removing the Docker image when uninstalling.
docker_image: # We can't be sure it had been pulled by us in the first place.
name: "{{ matrix_jitsi_web_docker_image }}"
state: absent
when: "not matrix_jitsi_enabled|bool"