Skip to content

Commit 804d29c

Browse files
authored
Merge pull request #93 from stackhpc/ansible-hostname
Fix deployment with FQDN hostnames
2 parents b7ec2f6 + 5897ce3 commit 804d29c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

roles/cephadm/tasks/osds.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
command:
1010
cmd: >
1111
cephadm shell --
12-
ceph orch daemon add osd {{ ansible_facts.hostname }}:{{ item }}
12+
ceph orch daemon add osd {{ ansible_facts.nodename }}:{{ item }}
1313
become: true
1414
register: osd_add_result
1515
changed_when: not osd_add_result.stdout.startswith("Created no osd(s) on host")

roles/cephadm/templates/cluster.yml.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{% for host in groups['ceph'] %}
22
---
33
service_type: host
4-
hostname: {{ hostvars[host].ansible_facts.hostname }}
4+
hostname: {{ hostvars[host].ansible_facts.nodename }}
55
{% set cephadm_admin_interface = hostvars[host]['cephadm_admin_interface'] %}
66
addr: {{ hostvars[host]['ansible_facts'][cephadm_admin_interface]['ipv4']['address'] }}
77
labels:

0 commit comments

Comments
 (0)