Commit 26a7256c authored by Guillaume Abrioux's avatar Guillaume Abrioux
Browse files

shrink-mgr: modify existing mgr check

Do not rely on the inventory aliases in order to check if the selected
manager to be removed is present.


Signed-off-by: default avatarGuillaume Abrioux <>
parent 31311b03
......@@ -74,14 +74,6 @@
manager each time the playbook runs."
when: mgr_to_kill is not defined
- name: exit playbook, if the manager is not part of the inventory
msg: "It seems that the host given is not part of your inventory,
please make sure it is."
- mgr_to_kill not in active_mgr
- mgr_to_kill not in standbys_mgr
- name: exit playbook, if user did not mean to shrink cluster
msg: "Exiting shrink-mgr playbook, no manager was removed.
......@@ -94,6 +86,13 @@
mgr_to_kill_hostname: "{{ hostvars[mgr_to_kill]['ansible_facts']['hostname'] }}"
- name: exit playbook, if the selected manager is not present in the cluster
msg: "It seems that the host given is not present in the cluster."
- mgr_to_kill_hostname not in active_mgr
- mgr_to_kill_hostname not in standbys_mgr
- name: stop manager services and verify it
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment