]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Fix ceph.conf template for containerized deployment 933/head
authorIvan Font <ivan.font@redhat.com>
Sat, 13 Aug 2016 00:45:55 +0000 (17:45 -0700)
committerIvan Font <ivan.font@redhat.com>
Sat, 13 Aug 2016 00:45:55 +0000 (17:45 -0700)
Signed-off-by: Ivan Font <ivan.font@redhat.com>
roles/ceph-common/templates/ceph.conf.j2

index ebff7b59e2868be29967753f6765a86d1dd728b6..12c0392396cee640d020f64fe86ad4f696c022e6 100644 (file)
@@ -18,20 +18,24 @@ osd crush chooseleaf type = 0
 {# NOTE (leseb): the blank lines in-between are needed otherwise we won't get any line break #}
 {% if groups[mon_group_name] is defined %}
 mon_initial_members = {% if groups[mon_group_name] is defined %}{% for host in groups[mon_group_name] %}{% if hostvars[host]['ansible_fqdn'] is defined and mon_use_fqdn %}{{ hostvars[host]['ansible_fqdn'] }}{% if not loop.last %},{% endif %}{% elif hostvars[host]['ansible_hostname'] is defined %}{{ hostvars[host]['ansible_hostname'] }}{% if not loop.last %},{% endif %}{% endif %}{% endfor %}{% endif %}
+{% endif %}
 
-mon_host = {% if groups[mon_group_name] is defined %}{% for host in groups[mon_group_name] %}{{ hostvars[host]['ansible_' + monitor_interface]['ipv4']['address'] }}{% if not loop.last %},{% endif %}{% endfor %}{% endif %}
+{% if not mon_containerized_deployment and not mon_containerized_deployment_with_kv %}
+{% if groups[mon_group_name] is defined %}
+mon host = {% for host in groups[mon_group_name] %}{{ hostvars[host]['ansible_' + monitor_interface]['ipv4']['address'] }}{% if not loop.last %},{% endif %}{% endfor %}
 {% elif (hostvars[host]['monitor_interface'] is defined and hostvars[host]['monitor_interface'] != "interface") or monitor_interface != "interface" %}
 {% include 'mon_addr_interface.j2' %}
 {% else %}
 {% include 'mon_addr_address.j2' %}
 {% endif %}
+{% endif %}
 {% if mon_containerized_deployment %}
 fsid = {{ fsid }}
 {% if groups[mon_group_name] is defined %}
 {% for host in groups[mon_group_name] %}
 {% if mon_containerized_deployment %}
 {% set interface = ["ansible_",ceph_mon_docker_interface]|join %}
-mon_host = {{ hostvars[host]['ansible_' + interface]['ipv4']['address'] }}
+mon_host = {{ hostvars[host][interface]['ipv4']['address'] }}
 {% if not loop.last %},{% endif %}
 {% elif hostvars[host]['monitor_address'] is defined %}
 mon_host = {{ hostvars[host]['monitor_address'] }}