Optimized reset routine for docker images and specially discourse

This commit is contained in:
2025-08-15 21:35:45 +02:00
parent e3b09e7f1a
commit 03564b34bb
15 changed files with 61 additions and 31 deletions

View File

@@ -6,14 +6,14 @@
state: present
notify: docker restart
- name: "Load cleanup tasks when MODE_CLEANUP or MODE_RESET is enabled"
include_tasks: "03_cleanup.yml"
when: MODE_CLEANUP | bool or MODE_RESET | bool
- name: "Load reset tasks when MODE_RESET is enabled"
include_tasks: "02_reset.yml"
when: MODE_RESET | bool
- name: "Load cleanup tasks when MODE_CLEANUP or MODE_RESET is enabled"
include_tasks: "03_cleanup.yml"
when: MODE_CLEANUP | bool or MODE_RESET | bool
- name: Include backup, repair and health services for docker
include_role:
name: "{{ item }}"

View File

@@ -8,7 +8,6 @@
name: "{{ (item.Names | default([item.Name]))[0] | regex_replace('^/','') }}"
state: absent
force_kill: true
remove_volumes: false # NEVER SET TO TRUE - PREVENTS DELETION OF VOLUMES
loop: "{{ docker_info.containers }}"
loop_control:
label: "{{ (item.Names | default([item.Name]))[0] }}"