diff --git a/deployment/pacemaker/compute-instanceha-baremetal-puppet.yaml b/deployment/pacemaker/compute-instanceha-baremetal-puppet.yaml index d4b000100e..d907254a2f 100644 --- a/deployment/pacemaker/compute-instanceha-baremetal-puppet.yaml +++ b/deployment/pacemaker/compute-instanceha-baremetal-puppet.yaml @@ -46,3 +46,20 @@ outputs: tripleo::instanceha: {get_param: EnableInstanceHA} step_config: | include ::tripleo::profile::pacemaker::compute_instanceha + upgrade_tasks: + - name: Ensure /etc/corosync/corosync.conf is not present as directory + when: + - step|int == 1 + block: + - name: Check /etc/corosync/corosync.conf + stat: + path: /etc/corosync/corosync.conf + register: corosync_conf + + - name: Remove corosync.conf if it is a directory + file: + path: /etc/corosync/corosync.conf + state: absent + when: + - corosync_conf.stat.isdir is defined + - corosync_conf.stat.isdir|bool