diff --git a/playbooks/pacemaker-status.yaml b/playbooks/pacemaker-status.yaml index b0e84efa6..cf341722e 100644 --- a/playbooks/pacemaker-status.yaml +++ b/playbooks/pacemaker-status.yaml @@ -9,6 +9,8 @@ A failed status post-deployment indicates something is not configured correctly. This should also be run before upgrade as the process will likely fail with a cluster that's not completely healthy. + + This validation fails if pacemaker service is found failed or inactive. groups: - post-deployment roles: diff --git a/roles/pacemaker_status/tasks/main.yml b/roles/pacemaker_status/tasks/main.yml index 27840fb80..3d32b1968 100644 --- a/roles/pacemaker_status/tasks/main.yml +++ b/roles/pacemaker_status/tasks/main.yml @@ -6,6 +6,11 @@ changed_when: false ignore_errors: true +- name: Check pacemaker service is inactive or failed + fail: + msg: "Pacemaker service found {{ check_service.stdout.split('=')[-1] }}" + when: check_service.stdout != 'ActiveState=active' + - when: "check_service.stdout == 'ActiveState=active'" block: - name: Get pacemaker status diff --git a/roles/pacemaker_status/vars/main.yml b/roles/pacemaker_status/vars/main.yml index de5aa6681..71040b537 100644 --- a/roles/pacemaker_status/vars/main.yml +++ b/roles/pacemaker_status/vars/main.yml @@ -7,5 +7,7 @@ metadata: A failed status post-deployment indicates something is not configured correctly. This should also be run before upgrade as the process will likely fail with a cluster that's not completely healthy. + + This validation fails if pacemaker service is found failed or inactive. groups: - post-deployment