mirror of https://github.com/ceph/ceph-ansible.git
mgr: refact 'wait for all mgr to be up' task
There's no need to use `shell` module here.
Instead of using `| python -c`, let's use `from_json` filter.
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 5b9b841108
)
pull/4318/merge
parent
d4348da7a1
commit
0f90ffe9df
|
@ -5,14 +5,14 @@
|
|||
when: dashboard_enabled | bool
|
||||
|
||||
- name: wait for all mgr to be up
|
||||
shell: "{{ container_exec_cmd_mgr | default('') }} ceph --cluster {{ cluster }} mgr dump -f json | python -c 'import sys, json; print(json.load(sys.stdin)[\"available\"])'"
|
||||
command: "{{ container_exec_cmd_mgr | default('') }} ceph --cluster {{ cluster }} mgr dump -f json"
|
||||
register: mgr_dump
|
||||
retries: 30
|
||||
delay: 5
|
||||
delegate_to: "{{ groups[mon_group_name][0] }}"
|
||||
until:
|
||||
- mgr_dump.rc == 0
|
||||
- mgr_dump.stdout | bool
|
||||
- (mgr_dump.stdout | from_json).available | bool
|
||||
|
||||
- name: get enabled modules from ceph-mgr
|
||||
command: "{{ container_exec_cmd_mgr | default('') }} ceph --cluster {{ cluster }} --format json mgr module ls"
|
||||
|
|
Loading…
Reference in New Issue