diff --git a/playbooks/ceph/validate-ceph-osds.yml b/playbooks/ceph/validate-ceph-osds.yml index fe06f62..3d5712e 100644 --- a/playbooks/ceph/validate-ceph-osds.yml +++ b/playbooks/ceph/validate-ceph-osds.yml @@ -343,9 +343,14 @@ _osds_test_up_in_result: "no-result" _osds_test_up_in_data: "" + - name: Set _mon_hostname fact + ansible.builtin.set_fact: + _mon_hostname: "{{ hostvars[groups[mon_group_name | default('ceph-mon')][0]]['ansible_hostname'] }}" + run_once: true + - name: Get ceph osd tree community.docker.docker_container_exec: - container: "ceph-mon-{{ ansible_hostname }}" + container: "ceph-mon-{{ _mon_hostname }}" command: "ceph osd tree --format=json" register: _osds_tree_raw run_once: true