Adjust ordering of flush task

This commit is contained in:
Joshua Boniface 2021-07-06 09:28:59 -04:00 committed by Joshua Boniface
parent 96544aabb8
commit bb094193b4
1 changed files with 8 additions and 8 deletions

View File

@ -68,6 +68,14 @@
- name: flush node
command: "pvc node flush {{ ansible_hostname }} --wait"
- name: make sure node is in flushed state
shell: "pvc node info {{ ansible_hostname }} | grep '^Domain State' | awk '{ print $NF }'"
register: pvcflush
failed_when: pvcflush.stdout != 'flushed'
until: pvcflush.stdout == 'flushed'
retries: 60
delay: 10
- name: ensure VMs are migrated away
shell: "virsh list | grep running | wc -l"
register: virshcount
@ -76,14 +84,6 @@
retries: 60
delay: 10
- name: make sure all VMs have migrated
shell: "pvc node info {{ ansible_hostname }} | grep '^Domain State' | awk '{ print $NF }'"
register: pvcflush
failed_when: pvcflush.stdout != 'flushed'
until: pvcflush.stdout == 'flushed'
retries: 60
delay: 10
- name: wait 15 seconds for system to stabilize
pause:
seconds: 15