diff --git a/roles/ceph-mgr/tasks/mgr_modules.yml b/roles/ceph-mgr/tasks/mgr_modules.yml index 2cb68fe1d..e9ee82087 100644 --- a/roles/ceph-mgr/tasks/mgr_modules.yml +++ b/roles/ceph-mgr/tasks/mgr_modules.yml @@ -1,4 +1,14 @@ --- +- name: wait for all mgr to be up + shell: "{{ docker_exec_cmd | default('') }} ceph --cluster {{ cluster }} mgr dump -f json | python -c 'import sys, json; print(json.load(sys.stdin)[\"available\"])'" + register: mgr_dump + retries: 30 + delay: 5 + delegate_to: "{{ groups[mon_group_name][0] }}" + until: + - mgr_dump.rc == 0 + - mgr_dump.stdout | bool + - name: get enabled modules from ceph-mgr command: "{{ docker_exec_cmd_mgr | default('') }} ceph --cluster {{ cluster }} --format json mgr module ls" changed_when: false