configure the undercloud to use nameservers from virthost
When using libvirt, use nameserver derived from the virthost /etc/resolv.conf file. This should work in public/private networks. Depends-On: I1e8e9d26469ac0034819c94029360379e2c6140c Change-Id: Id35120df9dd5331e64a06ee886ccd64edf8834ec
This commit is contained in:
parent
46642b0b56
commit
45d316afff
@ -52,3 +52,7 @@ novajoin_connect_timeout: 5
|
|||||||
novajoin_read_timeout: 20
|
novajoin_read_timeout: 20
|
||||||
|
|
||||||
libvirt_default_network_address: 192.168.122.1
|
libvirt_default_network_address: 192.168.122.1
|
||||||
|
|
||||||
|
# only to be used in libvirt deployments, see environment config for details
|
||||||
|
nameserver_from_virthost: false
|
||||||
|
virthost_nameservers: []
|
||||||
|
@ -1,5 +1,17 @@
|
|||||||
# Creat the scripts that will be used to deploy the undercloud
|
# Creat the scripts that will be used to deploy the undercloud
|
||||||
# environment.
|
# environment.
|
||||||
|
- name: Check the dns information provided by the virthost
|
||||||
|
shell: >
|
||||||
|
gawk '/^nameserver +/ { print $2 }' /etc/resolv.conf
|
||||||
|
delegate_to: virthost
|
||||||
|
register: virthost_nameservers_output
|
||||||
|
when: nameserver_from_virthost|bool
|
||||||
|
|
||||||
|
- name: set name server facts
|
||||||
|
set_fact:
|
||||||
|
virthost_nameservers: "{{ virthost_nameservers_output.stdout_lines }}"
|
||||||
|
when: nameserver_from_virthost|bool
|
||||||
|
|
||||||
- name: Create undercloud configuration
|
- name: Create undercloud configuration
|
||||||
template:
|
template:
|
||||||
src: "{{ undercloud_config_file }}"
|
src: "{{ undercloud_config_file }}"
|
||||||
|
@ -74,7 +74,11 @@ undercloud_admin_host = {{undercloud_undercloud_admin_host|default(
|
|||||||
|
|
||||||
# Nameserver for the Undercloud node.
|
# Nameserver for the Undercloud node.
|
||||||
# (string value)
|
# (string value)
|
||||||
{% if undercloud_undercloud_nameservers is string %}
|
{% if virthost_nameservers is string %}
|
||||||
|
undercloud_nameservers = {{ virthost_nameservers }}
|
||||||
|
{% elif virthost_nameservers is sequence and virthost_nameservers|length > 0 %}
|
||||||
|
undercloud_nameservers = {{ virthost_nameservers|join(',') }}
|
||||||
|
{% elif undercloud_undercloud_nameservers is string %}
|
||||||
undercloud_nameservers = {{ undercloud_undercloud_nameservers }}
|
undercloud_nameservers = {{ undercloud_undercloud_nameservers }}
|
||||||
{% elif undercloud_undercloud_nameservers is sequence %}
|
{% elif undercloud_undercloud_nameservers is sequence %}
|
||||||
undercloud_nameservers = {{ undercloud_undercloud_nameservers|join(',') }}
|
undercloud_nameservers = {{ undercloud_undercloud_nameservers|join(',') }}
|
||||||
|
Loading…
Reference in New Issue
Block a user