Run in reverse order to remove the initial container last.

This commit is contained in:
Andreas B. Mundt 2021-11-11 23:38:20 +01:00 committed by Andreas B. Mundt
parent cb5ade4c84
commit e058def667

View file

@ -11,7 +11,7 @@
- name: stop all containers
command: machinectl stop {{ contname }}{{ "%02d" | format(item|int) }}
loop: "{{ containers }}"
loop: "{{ containers | reverse}}"
tags:
- never
- stop
@ -20,7 +20,7 @@
- name: purge all containers
command: machinectl remove {{ contname }}{{ "%02d" | format(item|int) }}
loop: "{{ containers }}"
loop: "{{ containers | reverse }}"
tags:
- never
- purge
@ -29,14 +29,14 @@
file:
path: /var/lib/machines/{{ contname }}{{ "%02d" | format(item|int) }}-delta
state: absent
loop: "{{ containers }}"
loop: "{{ containers | reverse }}"
tags:
- never
- reset
- name: start all containers
command: machinectl start {{ contname }}{{ "%02d" | format(item|int) }}
loop: "{{ containers }}"
loop: "{{ containers | reverse }}"
tags:
- never
- start