diff --git a/ansible/kolla-ansible.yml b/ansible/kolla-ansible.yml index 7a5f9e499adb6436a63308a7d6f8cd09d78bd96d..6c13614836358ed966ee3e7b6afdf61fb61e523b 100644 --- a/ansible/kolla-ansible.yml +++ b/ansible/kolla-ansible.yml @@ -87,10 +87,10 @@ required: True - var_name: "kolla_external_vip_address" description: "external API VIP address" - required: True + required: "{{ public_net_name != internal_net_name }}" - var_name: "kolla_external_fqdn" description: "External API Fully Qualified Domain Name (FQDN)" - required: True + required: "{{ public_net_name != internal_net_name }}" tags: - config - config-validation diff --git a/ansible/public-openrc.yml b/ansible/public-openrc.yml index d81d1300bb713c93ce5e9394a554ed74ab9232bc..412c2cd1942cb298dc71f4df9495cd5d3843a951 100644 --- a/ansible/public-openrc.yml +++ b/ansible/public-openrc.yml @@ -8,7 +8,7 @@ - public-openrc vars: public_api_proto: "{% if kolla_enable_tls_external | bool %}https{% else %}http{% endif %}" - public_api_host: "{{ kolla_external_fqdn }}" + public_api_host: "{{ kolla_external_fqdn or kolla_internal_fqdn }}" public_api_keystone_port: 5000 roles: - role: public-openrc diff --git a/ansible/roles/kolla-ansible/templates/globals.yml.j2 b/ansible/roles/kolla-ansible/templates/globals.yml.j2 index 85b84472e49dd5d475d229c54065eccfeb2907c9..10b809a10d8d789a3b307b1411a5c72c84dc8110 100644 --- a/ansible/roles/kolla-ansible/templates/globals.yml.j2 +++ b/ansible/roles/kolla-ansible/templates/globals.yml.j2 @@ -36,17 +36,21 @@ kolla_internal_vip_address: "{{ kolla_internal_vip_address }}" # default it is the same as kolla_internal_vip_address. kolla_internal_fqdn: "{{ kolla_internal_fqdn }}" +{% if kolla_external_vip_address %} # This should be a VIP, an unused IP on your network that will float between # the hosts running keepalived for high-availability. It defaults to the # kolla_internal_vip_address, allowing internal and external communication to # share the same address. Specify a kolla_external_vip_address to separate # internal and external requests between two VIPs. kolla_external_vip_address: "{{ kolla_external_vip_address }}" +{% endif %} +{% if kolla_external_fqdn %} # The Public address used to communicate with OpenStack as set in the public_url # for the endpoints that will be created. This DNS name should map to # kolla_external_vip_address. kolla_external_fqdn: "{{ kolla_external_fqdn }}" +{% endif %} ################ # Docker options diff --git a/releasenotes/notes/fix-precheck-no-public-net-c0db9168063b6203.yaml b/releasenotes/notes/fix-precheck-no-public-net-c0db9168063b6203.yaml new file mode 100644 index 0000000000000000000000000000000000000000..cfe1ffcedce2495edbf8a23a163af5f83b5ee19f --- /dev/null +++ b/releasenotes/notes/fix-precheck-no-public-net-c0db9168063b6203.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Fixes an issue with configuration validation when no public API network is + in use. See `story 2009134 + <https://storyboard.openstack.org/#!/story/2009134>`__ for details.