Skip to content

Commit 6621bb9

Browse files
authored
Add addr: to cluster template (#38)
This will define IP addresses for nodes in cluster template and no longer rely on DNS or /etc/hosts entries.
1 parent 4cbc82e commit 6621bb9

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

roles/cephadm/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,6 @@ All Ceph hosts must be in the `ceph` group.
7272
* `cephadm_public_interface`: Public interface (mandatory)
7373
* `cephadm_public_network`: Public network including CIDR (mandatory)
7474
* Optional
75+
* `cephadm_admin_interface`: Admin interface (default: use ``cephadm_public_interface``)
7576
* `cephadm_cluster_interface`: Cluster interface (optional - if not defined ceph will not use dedicated cluster network)
7677
* `cephadm_cluster_network`: Cluster network including CIDR (optional - if not defined ceph will not use dedicated cluster network)

roles/cephadm/defaults/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ cephadm_ssh_public_key: "/etc/ceph/cephadm.pub"
2121
cephadm_ssh_private_key: "/etc/ceph/cephadm.id"
2222
cephadm_ssh_user: "{{ ansible_user }}"
2323
# Networking
24+
cephadm_admin_interface: "{{ cephadm_public_interface }}"
2425
cephadm_public_interface: ""
2526
cephadm_cluster_interface: ""
2627
cephadm_public_network: ""

roles/cephadm/templates/cluster.yml.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
---
33
service_type: host
44
hostname: {{ hostvars[host]['ansible_hostname'] }}
5+
addr: {{ hostvars[host]['ansible_'~cephadm_admin_interface]['ipv4']['address'] }}
56
labels:
67
{% if host in groups['mons'] %}
78
- _admin

0 commit comments

Comments
 (0)