Deploy of keystone fails if api_interface names differ

If control hosts have different names of interfaces one can set
api_interface variables per host. Deployment of keystone fails
because rpc_transport_url and notify_transport_url variables
use bare api_interface instead of one from hostvars.

Change-Id: I8bb4aa2953cf4ba63ef6815f2504d35e5aa0a07b
Closes-Bug: #1748473
This commit is contained in:
Vladislav Belogrudov 2018-02-09 19:40:18 +03:00
parent bdf50d5df5
commit d79b213302

View File

@ -133,7 +133,7 @@ om_rpc_password: "{{ rabbitmq_password }}"
om_rpc_port: "{{ rabbitmq_port }}"
om_rpc_group: "rabbitmq"
rpc_transport_url: "{{ om_rpc_transport }}://{% for host in groups[om_rpc_group] %}{{ om_rpc_user }}:{{ om_rpc_password }}@{{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ om_rpc_port }}{% if not loop.last %},{% endif %}{% endfor %}"
rpc_transport_url: "{{ om_rpc_transport }}://{% for host in groups[om_rpc_group] %}{{ om_rpc_user }}:{{ om_rpc_password }}@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ om_rpc_port }}{% if not loop.last %},{% endif %}{% endfor %}"
# oslo.messaging notify transport valid options are [ rabbit ]
om_notify_transport: "rabbit"
@ -142,7 +142,7 @@ om_notify_password: "{{ rabbitmq_password }}"
om_notify_port: "{{ rabbitmq_port }}"
om_notify_group: "rabbitmq"
notify_transport_url: "{{ om_notify_transport }}://{% for host in groups[om_notify_group] %}{{ om_notify_user }}:{{ om_notify_password }}@{{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ om_notify_port }}{% if not loop.last %},{% endif %}{% endfor %}"
notify_transport_url: "{{ om_notify_transport }}://{% for host in groups[om_notify_group] %}{{ om_notify_user }}:{{ om_notify_password }}@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ om_notify_port }}{% if not loop.last %},{% endif %}{% endfor %}"
####################
# Networking options