Skip to content

Commit

Permalink
Use fact for the hostname of the first ceph mon service (#495)
Browse files Browse the repository at this point in the history
Related to 807f10c

Signed-off-by: Christian Berendt <[email protected]>
  • Loading branch information
berendt authored Sep 20, 2024
1 parent 807f10c commit 875d7c9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion playbooks/ceph/validate-ceph-osds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 875d7c9

Please sign in to comment.