Run in reverse order to remove the initial container last.
This commit is contained in:
parent
cb5ade4c84
commit
e058def667
1 changed files with 4 additions and 4 deletions
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
- name: stop all containers
|
- name: stop all containers
|
||||||
command: machinectl stop {{ contname }}{{ "%02d" | format(item|int) }}
|
command: machinectl stop {{ contname }}{{ "%02d" | format(item|int) }}
|
||||||
loop: "{{ containers }}"
|
loop: "{{ containers | reverse}}"
|
||||||
tags:
|
tags:
|
||||||
- never
|
- never
|
||||||
- stop
|
- stop
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
- name: purge all containers
|
- name: purge all containers
|
||||||
command: machinectl remove {{ contname }}{{ "%02d" | format(item|int) }}
|
command: machinectl remove {{ contname }}{{ "%02d" | format(item|int) }}
|
||||||
loop: "{{ containers }}"
|
loop: "{{ containers | reverse }}"
|
||||||
tags:
|
tags:
|
||||||
- never
|
- never
|
||||||
- purge
|
- purge
|
||||||
|
@ -29,14 +29,14 @@
|
||||||
file:
|
file:
|
||||||
path: /var/lib/machines/{{ contname }}{{ "%02d" | format(item|int) }}-delta
|
path: /var/lib/machines/{{ contname }}{{ "%02d" | format(item|int) }}-delta
|
||||||
state: absent
|
state: absent
|
||||||
loop: "{{ containers }}"
|
loop: "{{ containers | reverse }}"
|
||||||
tags:
|
tags:
|
||||||
- never
|
- never
|
||||||
- reset
|
- reset
|
||||||
|
|
||||||
- name: start all containers
|
- name: start all containers
|
||||||
command: machinectl start {{ contname }}{{ "%02d" | format(item|int) }}
|
command: machinectl start {{ contname }}{{ "%02d" | format(item|int) }}
|
||||||
loop: "{{ containers }}"
|
loop: "{{ containers | reverse }}"
|
||||||
tags:
|
tags:
|
||||||
- never
|
- never
|
||||||
- start
|
- start
|
||||||
|
|
Loading…
Add table
Reference in a new issue