Fix retrieving api_interface

In heterogeneous environment, api_interfaces are different each other.
So we should specify it from hostvars.

Implements: bp configure-network-interface
Change-Id: Id15d70bfb9ebb62a64a3847a6b77407efb171dbe
This commit is contained in:
OTSUKA, Yuanying 2015-11-20 18:50:55 +09:00
parent de7293833e
commit 903c7d4c3f
13 changed files with 37 additions and 33 deletions

View File

@ -17,6 +17,10 @@ network01
[compute] [compute]
compute01 compute01
# When compute nodes and control nodes use different interfaces,
# you can specify "api_interface" and another interfaces like below:
#compute01 neutron_external_interface=eth0 api_interface=em1 storage_interface=em1 tunnel_interface=em1
[storage] [storage]
storage01 storage01

View File

@ -2,7 +2,7 @@
fsid = {{ ceph_cluster_fsid }} fsid = {{ ceph_cluster_fsid }}
mon initial members = {% for host in groups['ceph-mon'] %}{{ hostvars[host]['ansible_hostname'] }}{% if not loop.last %}, {% endif %}{% endfor %} mon initial members = {% for host in groups['ceph-mon'] %}{{ hostvars[host]['ansible_hostname'] }}{% if not loop.last %}, {% endif %}{% endfor %}
mon host = {% for host in groups['ceph-mon'] %}{{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}{% if not loop.last %}, {% endif %}{% endfor %} mon host = {% for host in groups['ceph-mon'] %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}{% if not loop.last %}, {% endif %}{% endfor %}
auth cluster required = cephx auth cluster required = cephx
auth service required = cephx auth service required = cephx

View File

@ -60,7 +60,7 @@ lock_path = /var/lib/cinder/tmp
rabbit_userid = {{ rabbitmq_user }} rabbit_userid = {{ rabbitmq_user }}
rabbit_password = {{ rabbitmq_password }} rabbit_password = {{ rabbitmq_password }}
rabbit_ha_queues = true rabbit_ha_queues = true
rabbit_hosts = {% for host in groups['rabbitmq'] %}{{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %} rabbit_hosts = {% for host in groups['rabbitmq'] %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %}
{% if cinder_volume_driver == "lvm" %} {% if cinder_volume_driver == "lvm" %}

View File

@ -29,7 +29,7 @@ listen mariadb
option mysql-check user haproxy option mysql-check user haproxy
bind {{ kolla_internal_address }}:{{ mariadb_port }} bind {{ kolla_internal_address }}:{{ mariadb_port }}
{% for host in groups['mariadb'] %} {% for host in groups['mariadb'] %}
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ mariadb_port }} check inter 2000 rise 2 fall 5 {% if not loop.first %}backup{% endif %} server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ mariadb_port }} check inter 2000 rise 2 fall 5 {% if not loop.first %}backup{% endif %}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
@ -38,7 +38,7 @@ listen mariadb
listen rabbitmq_management listen rabbitmq_management
bind {{ kolla_internal_address }}:{{ rabbitmq_management_port }} bind {{ kolla_internal_address }}:{{ rabbitmq_management_port }}
{% for host in groups['rabbitmq'] %} {% for host in groups['rabbitmq'] %}
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ rabbitmq_management_port }} check inter 2000 rise 2 fall 5 server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_management_port }} check inter 2000 rise 2 fall 5
{% endfor %} {% endfor %}
{% endif %} {% endif %}
@ -46,13 +46,13 @@ listen rabbitmq_management
listen keystone_public listen keystone_public
bind {{ kolla_internal_address }}:{{ keystone_public_port }} bind {{ kolla_internal_address }}:{{ keystone_public_port }}
{% for host in groups['keystone'] %} {% for host in groups['keystone'] %}
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ keystone_public_port }} check inter 2000 rise 2 fall 5 server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ keystone_public_port }} check inter 2000 rise 2 fall 5
{% endfor %} {% endfor %}
listen keystone_admin listen keystone_admin
bind {{ kolla_internal_address }}:{{ keystone_admin_port }} bind {{ kolla_internal_address }}:{{ keystone_admin_port }}
{% for host in groups['keystone'] %} {% for host in groups['keystone'] %}
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ keystone_admin_port }} check inter 2000 rise 2 fall 5 server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ keystone_admin_port }} check inter 2000 rise 2 fall 5
{% endfor %} {% endfor %}
{% endif %} {% endif %}
@ -60,13 +60,13 @@ listen keystone_admin
listen glance_registry listen glance_registry
bind {{ kolla_internal_address }}:{{ glance_registry_port }} bind {{ kolla_internal_address }}:{{ glance_registry_port }}
{% for host in groups['glance-registry'] %} {% for host in groups['glance-registry'] %}
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ glance_registry_port }} check inter 2000 rise 2 fall 5 server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ glance_registry_port }} check inter 2000 rise 2 fall 5
{% endfor %} {% endfor %}
listen glance_api listen glance_api
bind {{ kolla_internal_address }}:{{ glance_api_port }} bind {{ kolla_internal_address }}:{{ glance_api_port }}
{% for host in groups['glance-api'] %} {% for host in groups['glance-api'] %}
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ glance_api_port }} check inter 2000 rise 2 fall 5 server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ glance_api_port }} check inter 2000 rise 2 fall 5
{% endfor %} {% endfor %}
{% endif %} {% endif %}
@ -74,32 +74,32 @@ listen glance_api
listen nova_api listen nova_api
bind {{ kolla_internal_address }}:{{ nova_api_port }} bind {{ kolla_internal_address }}:{{ nova_api_port }}
{% for host in groups['nova-api'] %} {% for host in groups['nova-api'] %}
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ nova_api_port }} check inter 2000 rise 2 fall 5 server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ nova_api_port }} check inter 2000 rise 2 fall 5
{% endfor %} {% endfor %}
listen nova_api_ec2 listen nova_api_ec2
bind {{ kolla_internal_address }}:{{ nova_api_ec2_port }} bind {{ kolla_internal_address }}:{{ nova_api_ec2_port }}
{% for host in groups['nova-api'] %} {% for host in groups['nova-api'] %}
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ nova_api_ec2_port }} check inter 2000 rise 2 fall 5 server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ nova_api_ec2_port }} check inter 2000 rise 2 fall 5
{% endfor %} {% endfor %}
listen nova_metadata listen nova_metadata
bind {{ kolla_internal_address }}:{{ nova_metadata_port }} bind {{ kolla_internal_address }}:{{ nova_metadata_port }}
{% for host in groups['nova-api'] %} {% for host in groups['nova-api'] %}
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ nova_metadata_port }} check inter 2000 rise 2 fall 5 server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ nova_metadata_port }} check inter 2000 rise 2 fall 5
{% endfor %} {% endfor %}
{% if nova_console == 'novnc' %} {% if nova_console == 'novnc' %}
listen nova_novncproxy listen nova_novncproxy
bind {{ kolla_internal_address }}:{{ nova_novncproxy_port }} bind {{ kolla_internal_address }}:{{ nova_novncproxy_port }}
{% for host in groups['nova-novncproxy'] %} {% for host in groups['nova-novncproxy'] %}
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ nova_novncproxy_port }} check inter 2000 rise 2 fall 5 server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ nova_novncproxy_port }} check inter 2000 rise 2 fall 5
{% endfor %} {% endfor %}
{% elif nova_console == 'spice' %} {% elif nova_console == 'spice' %}
listen nova_spicehtml5proxy listen nova_spicehtml5proxy
bind {{ kolla_internal_address }}:{{ nova_spicehtml5proxy_port }} bind {{ kolla_internal_address }}:{{ nova_spicehtml5proxy_port }}
{% for host in groups['nova-spicehtml5proxy'] %} {% for host in groups['nova-spicehtml5proxy'] %}
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ nova_spicehtml5proxy_port }} check inter 2000 rise 2 fall 5 server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ nova_spicehtml5proxy_port }} check inter 2000 rise 2 fall 5
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% endif %} {% endif %}
@ -108,7 +108,7 @@ listen nova_spicehtml5proxy
listen neutron_server listen neutron_server
bind {{ kolla_internal_address }}:{{ neutron_server_port }} bind {{ kolla_internal_address }}:{{ neutron_server_port }}
{% for host in groups['neutron-server'] %} {% for host in groups['neutron-server'] %}
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ neutron_server_port }} check inter 2000 rise 2 fall 5 server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ neutron_server_port }} check inter 2000 rise 2 fall 5
{% endfor %} {% endfor %}
{% endif %} {% endif %}
@ -116,7 +116,7 @@ listen neutron_server
listen horizon listen horizon
bind {{ kolla_internal_address }}:80 bind {{ kolla_internal_address }}:80
{% for host in groups['horizon'] %} {% for host in groups['horizon'] %}
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:80 check inter 2000 rise 2 fall 5 server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:80 check inter 2000 rise 2 fall 5
{% endfor %} {% endfor %}
{% endif %} {% endif %}
@ -124,7 +124,7 @@ listen horizon
listen cinder_api listen cinder_api
bind {{ kolla_internal_address }}:{{ cinder_api_port }} bind {{ kolla_internal_address }}:{{ cinder_api_port }}
{% for host in groups['cinder-api'] %} {% for host in groups['cinder-api'] %}
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ cinder_api_port }} check inter 2000 rise 2 fall 5 server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ cinder_api_port }} check inter 2000 rise 2 fall 5
{% endfor %} {% endfor %}
{% endif %} {% endif %}
@ -132,13 +132,13 @@ listen cinder_api
listen heat_api listen heat_api
bind {{ kolla_internal_address }}:{{ heat_api_port }} bind {{ kolla_internal_address }}:{{ heat_api_port }}
{% for host in groups['heat-api'] %} {% for host in groups['heat-api'] %}
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ heat_api_port }} check inter 2000 rise 2 fall 5 server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ heat_api_port }} check inter 2000 rise 2 fall 5
{% endfor %} {% endfor %}
listen heat_api_cfn listen heat_api_cfn
bind {{ kolla_internal_address }}:{{ heat_api_cfn_port }} bind {{ kolla_internal_address }}:{{ heat_api_cfn_port }}
{% for host in groups['heat-api-cfn'] %} {% for host in groups['heat-api-cfn'] %}
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ heat_api_cfn_port }} check inter 2000 rise 2 fall 5 server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ heat_api_cfn_port }} check inter 2000 rise 2 fall 5
{% endfor %} {% endfor %}
{% endif %} {% endif %}
@ -146,7 +146,7 @@ listen heat_api_cfn
listen ironic_api listen ironic_api
bind {{ kolla_internal_address}}:{{ ironic_api_port }} bind {{ kolla_internal_address}}:{{ ironic_api_port }}
{% for host in groups['ironic-api'] %} {% for host in groups['ironic-api'] %}
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ ironic_api_port }} check inter 2000 rise 2 fall 5 server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ ironic_api_port }} check inter 2000 rise 2 fall 5
{% endfor %} {% endfor %}
{% endif %} {% endif %}
@ -154,7 +154,7 @@ listen ironic_api
listen swift_api listen swift_api
bind {{ kolla_internal_address}}:{{ swift_proxy_server_port }} bind {{ kolla_internal_address}}:{{ swift_proxy_server_port }}
{% for host in groups['swift-proxy-server'] %} {% for host in groups['swift-proxy-server'] %}
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ swift_proxy_server_port }} check inter 2000 rise 2 fall 5 server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ swift_proxy_server_port }} check inter 2000 rise 2 fall 5
{% endfor %} {% endfor %}
{% endif %} {% endif %}
@ -162,7 +162,7 @@ listen swift_api
listen murano_api listen murano_api
bind {{ kolla_internal_address }}:{{ murano_api_port }} bind {{ kolla_internal_address }}:{{ murano_api_port }}
{% for host in groups['murano-api'] %} {% for host in groups['murano-api'] %}
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ murano_api_port }} check inter 2000 rise 2 fall 5 server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ murano_api_port }} check inter 2000 rise 2 fall 5
{% endfor %} {% endfor %}
{% endif %} {% endif %}
@ -170,6 +170,6 @@ listen murano_api
listen magnum_api listen magnum_api
bind {{ kolla_internal_address }}:{{ magnum_api_port }} bind {{ kolla_internal_address }}:{{ magnum_api_port }}
{% for host in groups['magnum-api'] %} {% for host in groups['magnum-api'] %}
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ magnum_api_port }} check inter 2000 rise 2 fall 5 server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ magnum_api_port }} check inter 2000 rise 2 fall 5
{% endfor %} {% endfor %}
{% endif %} {% endif %}

View File

@ -18,7 +18,7 @@ use_syslog=yes
rabbit_userid = {{ rabbitmq_user }} rabbit_userid = {{ rabbitmq_user }}
rabbit_password = {{ rabbitmq_password }} rabbit_password = {{ rabbitmq_password }}
rabbit_ha_queues = true rabbit_ha_queues = true
rabbit_hosts = {% for host in groups['rabbitmq'] %}{{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %} rabbit_hosts = {% for host in groups['rabbitmq'] %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %}
{% if service_name == 'heat-api' %} {% if service_name == 'heat-api' %}
[heat_api] [heat_api]

View File

@ -126,7 +126,7 @@ SECRET_KEY='{{ horizon_secret_key }}'
CACHES = { CACHES = {
'default': { 'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'LOCATION': '{% for host in groups['memcached'] %}{{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ memcached_port }}{% if not loop.last %},{% endif %}{% endfor %}', 'LOCATION': '{% for host in groups['memcached'] %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ memcached_port }}{% if not loop.last %},{% endif %}{% endfor %}',
} }
} }

View File

@ -38,4 +38,4 @@ url = http://{{ kolla_internal_address }}:{{ neutron_server_port }}
rabbit_userid = {{ rabbitmq_user }} rabbit_userid = {{ rabbitmq_user }}
rabbit_password = {{ rabbitmq_password }} rabbit_password = {{ rabbitmq_password }}
rabbit_ha_queues = true rabbit_ha_queues = true
rabbit_hosts = {% for host in groups['rabbitmq'] %}{{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %} rabbit_hosts = {% for host in groups['rabbitmq'] %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %}

View File

@ -44,4 +44,4 @@ lock_path = /var/lib/magnum/tmp
rabbit_userid = {{ rabbitmq_user }} rabbit_userid = {{ rabbitmq_user }}
rabbit_password = {{ rabbitmq_password }} rabbit_password = {{ rabbitmq_password }}
rabbit_ha_queues = true rabbit_ha_queues = true
rabbit_hosts = {% for host in groups['rabbitmq'] %}{{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %} rabbit_hosts = {% for host in groups['rabbitmq'] %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %}

View File

@ -9,7 +9,7 @@ innodb_autoinc_lock_mode=2
datadir=/var/lib/mysql/ datadir=/var/lib/mysql/
wsrep_cluster_address=gcomm://{% if (groups['mariadb'] | length) > 1 %}{% for host in groups['mariadb'] %}{{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ mariadb_wsrep_port }}{% if not loop.last %},{% endif %}{% endfor %}{% endif %} wsrep_cluster_address=gcomm://{% if (groups['mariadb'] | length) > 1 %}{% for host in groups['mariadb'] %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ mariadb_wsrep_port }}{% if not loop.last %},{% endif %}{% endfor %}{% endif %}
wsrep_provider_options="gmcast.listen_addr=tcp://{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}:{{ mariadb_wsrep_port }};ist.recv_addr={{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}:{{ mariadb_ist_port }}" wsrep_provider_options="gmcast.listen_addr=tcp://{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}:{{ mariadb_wsrep_port }};ist.recv_addr={{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}:{{ mariadb_ist_port }}"

View File

@ -32,4 +32,4 @@ url = http://{{ kolla_internal_address }}:{{ murano_api_port }}
rabbit_userid = {{ rabbitmq_user }} rabbit_userid = {{ rabbitmq_user }}
rabbit_password = {{ rabbitmq_password }} rabbit_password = {{ rabbitmq_password }}
rabbit_ha_queues = true rabbit_ha_queues = true
rabbit_hosts = {% for host in groups['rabbitmq'] %}{{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %} rabbit_hosts = {% for host in groups['rabbitmq'] %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %}

View File

@ -41,7 +41,7 @@ lock_path = /var/lib/neutron/tmp
rabbit_userid = {{ rabbitmq_user }} rabbit_userid = {{ rabbitmq_user }}
rabbit_password = {{ rabbitmq_password }} rabbit_password = {{ rabbitmq_password }}
rabbit_ha_queues = true rabbit_ha_queues = true
rabbit_hosts = {% for host in groups['rabbitmq'] %}{{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %} rabbit_hosts = {% for host in groups['rabbitmq'] %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %}
[agent] [agent]
root_helper = sudo neutron-rootwrap /etc/neutron/rootwrap.conf root_helper = sudo neutron-rootwrap /etc/neutron/rootwrap.conf

View File

@ -43,7 +43,7 @@ scheduler_use_baremetal_filters = True
compute_driver = libvirt.LibvirtDriver compute_driver = libvirt.LibvirtDriver
{% endif %} {% endif %}
memcached_servers = {% for host in groups['memcached'] %}{{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ memcached_port }}{% if not loop.last %},{% endif %}{% endfor %} memcached_servers = {% for host in groups['memcached'] %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ memcached_port }}{% if not loop.last %},{% endif %}{% endfor %}
# Though my_ip is not used directly, lots of other variables use $my_ip # Though my_ip is not used directly, lots of other variables use $my_ip
@ -86,7 +86,7 @@ api_endpoint = http://{{ kolla_internal_address }}:{{ ironic_api_port }}/v1
rabbit_userid = {{ rabbitmq_user }} rabbit_userid = {{ rabbitmq_user }}
rabbit_password = {{ rabbitmq_password }} rabbit_password = {{ rabbitmq_password }}
rabbit_ha_queues = true rabbit_ha_queues = true
rabbit_hosts = {% for host in groups['rabbitmq'] %}{{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %} rabbit_hosts = {% for host in groups['rabbitmq'] %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %}
[oslo_concurrency] [oslo_concurrency]
lock_path = /var/lib/nova/tmp lock_path = /var/lib/nova/tmp
@ -96,7 +96,7 @@ lock_path = /var/lib/nova/tmp
host = {{ kolla_internal_address }} host = {{ kolla_internal_address }}
port = {{ glance_api_port }} port = {{ glance_api_port }}
{% else %} {% else %}
api_servers = {% for host in groups['glance-api'] %}{{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ glance_api_port }}{% if not loop.last %},{% endif %}{% endfor %} api_servers = {% for host in groups['glance-api'] %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ glance_api_port }}{% if not loop.last %},{% endif %}{% endfor %}
num_retries = {{ groups['glance-api'] | length }} num_retries = {{ groups['glance-api'] | length }}
{% endif %} {% endif %}

View File

@ -16,7 +16,7 @@ account_autocreate = true
[filter:cache] [filter:cache]
use = egg:swift#memcache use = egg:swift#memcache
memcache_servers = {% for host in groups['swift-proxy-server'] %}{{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ memcached_port }}{% if not loop.last %},{% endif %}{% endfor %} memcache_servers = {% for host in groups['swift-proxy-server'] %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ memcached_port }}{% if not loop.last %},{% endif %}{% endfor %}
[filter:catch_errors] [filter:catch_errors]
use = egg:swift#catch_errors use = egg:swift#catch_errors