diff --git a/lib/ansible/modules/clustering/pacemaker_cluster.py b/lib/ansible/modules/clustering/pacemaker_cluster.py index 4d0761f6741..79c44defec5 100644 --- a/lib/ansible/modules/clustering/pacemaker_cluster.py +++ b/lib/ansible/modules/clustering/pacemaker_cluster.py @@ -219,9 +219,10 @@ def main(): module.fail_json(msg="Failed during the restart of the cluster, the cluster can't be stopped") if state in ['cleanup']: - set_cluster(module, state, timeout, force) + clean_cluster(module, timeout) + cluster_state = get_cluster_status(module) module.exit_json(changed=True, - out=cluster_state) + out=cluster_state) if __name__ == '__main__':