Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion roles/cephadm/templates/cluster.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
service_type: host
hostname: {{ hostvars[host].ansible_facts.hostname }}
{% set cephadm_admin_interface = hostvars[host]['cephadm_admin_interface'] %}
addr: {{ hostvars[host]['ansible_facts'][cephadm_admin_interface]['ipv4']['address'] }}
addr: {{ hostvars[host]['ansible_all_ipv4_addresses'] | ipaddr( cephadm_public_network ) | first }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to use ansible_facts.

Suggested change
addr: {{ hostvars[host]['ansible_all_ipv4_addresses'] | ipaddr( cephadm_public_network ) | first }}
addr: {{ hostvars[host]['ansible_facts']['all_ipv4_addresses'] | ipaddr( cephadm_public_network ) | first }}

labels:
{% if host in groups['mons'] %}
- _admin
Expand Down