mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-30 23:38:13 +02:00
Optimized reset routine for docker images and specially discourse
This commit is contained in:
@@ -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 }}"
|
||||
|
@@ -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] }}"
|
||||
|
Reference in New Issue
Block a user