facts: fix mgr/mon collocation

`service dump` hangs when no active mgr is available.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
pull/7161/head
Guillaume Abrioux 2022-04-19 23:36:08 +02:00
parent 1bb71b7626
commit d9feaf8ade
1 changed files with 1 additions and 0 deletions

View File

@ -211,6 +211,7 @@
when:
- (inventory_hostname in groups.get(rgw_group_name, []) or inventory_hostname in groups.get(nfs_group_name, []))
- groups.get(mon_group_name, []) | length > 0
- handler_mgr_status | default(False)
block:
- name: get ceph current status
command: "{{ timeout_command }} {{ _container_exec_cmd | default('') }} ceph --cluster {{ cluster }} service dump -f json"