Idempotency for system_upgrade_prepare

Partial-Bug: #1831690
Change-Id: I9510fd00755cf33df105ef637d047d3cb87243ae
This commit is contained in:
Jiri Stransky 2019-06-24 12:32:37 +02:00
parent 2ca7c55039
commit 56a35beb51

View File

@ -154,10 +154,16 @@ outputs:
- system_upgrade_prepare
when: step|int == 2
block:
- name: Check if pcs is present
stat:
path: /usr/sbin/pcs
register: pcs_stat
- name: Stop pacemaker cluster
pacemaker_cluster: state=offline
when: pcs_stat.stat.exists
- name: destroy pacemaker cluster
command: /usr/sbin/pcs cluster destroy
when: pcs_stat.stat.exists
- name: upgrade step 0
when: step|int == 0
vars: