Merge "Allow to specify the public IP to be used for public endpoints"

This commit is contained in:
Zuul 2018-10-05 15:10:07 +00:00 committed by Gerrit Code Review
commit b91887883d
4 changed files with 16 additions and 3 deletions

View File

@ -170,7 +170,7 @@
- name: "Setting external Ironic public URL"
set_fact:
ironic_public_url: "{{ ironic.keystone.public_url | default('http://127.0.0.1:6385/') | replace('127.0.0.1', hostvars[inventory_hostname]['ansible_' + ans_network_interface]['ipv4']['address']) }}"
ironic_public_url: "{{ ironic.keystone.public_url | default('http://127.0.0.1:6385/') | replace('127.0.0.1', public_ip | default(hostvars[inventory_hostname]['ansible_' + ans_network_interface]['ipv4']['address'])) }}"
when: use_public_urls | default(false) | bool
- name: "Create ironic public endpoint"

View File

@ -149,7 +149,7 @@
- name: "Setting external ironic-inspector public URL"
set_fact:
ironic_inspector_public_url: "{{ ironic_inspector.keystone.public_url | default('http://127.0.0.1:5050/') | replace('127.0.0.1', hostvars[inventory_hostname]['ansible_' + ans_network_interface]['ipv4']['address']) }}"
ironic_inspector_public_url: "{{ ironic_inspector.keystone.public_url | default('http://127.0.0.1:5050/') | replace('127.0.0.1', public_ip | default(hostvars[inventory_hostname]['ansible_' + ans_network_interface]['ipv4']['address'])) }}"
when: use_public_urls | default(false) | bool
# NOTE(TheJulia): This seems like something that should be

View File

@ -170,7 +170,7 @@
- name: "Setting external Keystone public URL"
set_fact:
keystone_public_url: "{{ keystone.bootstrap.public_url | replace('127.0.0.1', hostvars[inventory_hostname]['ansible_' + ans_network_interface]['ipv4']['address']) }}"
keystone_public_url: "{{ keystone.bootstrap.public_url | replace('127.0.0.1', public_ip | default(hostvars[inventory_hostname]['ansible_' + ans_network_interface]['ipv4']['address'])) }}"
when: use_public_urls | default(false) | bool
- name: "Setting internal Keystone URL"

View File

@ -0,0 +1,13 @@
---
features:
- |
By adding extra string variable ``-e public_ip=8.8.8.8``
which is to be used in conjunction with ``use_public_urls=true``
Bifrost, if used with Keystone enabled, will configure
public services endpoints (for Keystone, Ironic and Ironic
Inspector) to contain this public IP address in replacement
of the default values which are set to point to localhost.
The default behaviour is kept unchanged, which means that
services public endpoints will contain references to
localhost aka 127.0.0.1.