kayobe/ansible/public-openrc.yml
Mark Goddard 3c56f32fac Fix configuration check without public API network
If no public API network is used, as in the case of typical all-in-one
environments, the checks in kolla-ansible.yml, task "Validate Kolla
Ansible API address configuration" may fail. This happens only when
using the new kolla_internal_vip_address variable, and not if the legacy
vip_address network attribute is used.

This change fixes the issue by only checking for valid external VIP
address/FQDN configuration when a separate public API network is in use.
If the external VIP/FQDN are not set, then Kayobe no longer defaults
their values to the internal VIP/FQDN, instead relying on the Kolla
Ansible defaults to do this. This may have consequences for anyone
relying on these variables in configuration.

Change-Id: I0b1c963006c044ade5c67c4046da5e2addc9a8c7
Story: 2009134
Task: 43070
2021-08-20 17:52:50 +01:00

17 lines
655 B
YAML

---
# Generate an environment file for interacting with the public OpenStack APIs
# as the admin user in the admin project.
- name: Ensure a public OpenStack API environment file exists
hosts: localhost
tags:
- public-openrc
vars:
public_api_proto: "{% if kolla_enable_tls_external | bool %}https{% else %}http{% endif %}"
public_api_host: "{{ kolla_external_fqdn or kolla_internal_fqdn }}"
public_api_keystone_port: 5000
roles:
- role: public-openrc
public_openrc_kolla_config_path: "{{ kolla_config_path }}"
public_openrc_auth_url: "{{ public_api_proto }}://{{ public_api_host }}:{{ public_api_keystone_port }}"