mirror of https://github.com/ceph/ceph-ansible.git
Merge pull request #1666 from ceph/ceph-conf-interfaces
use host specific value for monitor_interface in ceph.conf creationpull/1673/head
commit
49de6f9a5b
|
@ -33,8 +33,10 @@
|
|||
tags:
|
||||
- package-install
|
||||
|
||||
- name: make sure monitor_interface is defined
|
||||
- name: make sure monitor_interface or monitor_address is defined
|
||||
fail:
|
||||
msg: "you must set monitor_interface"
|
||||
msg: "you must set monitor_interface or monitor_address"
|
||||
when:
|
||||
- monitor_interface == 'interface'
|
||||
- monitor_address == "0.0.0.0"
|
||||
- mon_group_name in group_names
|
||||
|
|
|
@ -46,9 +46,9 @@ mon host = {% for host in groups[mon_group_name] -%}
|
|||
{%- endif %}
|
||||
{%- else -%}
|
||||
{% if ip_version == 'ipv4' -%}
|
||||
{{ hostvars[host]['ansible_' + monitor_interface][ip_version]['address'] }}
|
||||
{{ hostvars[host]['ansible_' + hostvars[host]['monitor_interface']][ip_version]['address'] }}
|
||||
{%- elif ip_version == 'ipv6' -%}
|
||||
[{{ hostvars[host]['ansible_' + monitor_interface][ip_version][0]['address'] }}]
|
||||
[{{ hostvars[host]['ansible_' + hostvars[host]['monitor_interface']][ip_version][0]['address'] }}]
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{% if not loop.last -%},{%- endif %}
|
||||
|
|
|
@ -4,7 +4,6 @@ ceph_stable: True
|
|||
cluster: test
|
||||
public_network: "192.168.1.0/24"
|
||||
cluster_network: "192.168.2.0/24"
|
||||
monitor_interface: eth1
|
||||
journal_size: 100
|
||||
osd_objectstore: "filestore"
|
||||
devices:
|
||||
|
|
Loading…
Reference in New Issue