diff options
author | Tomas Sedovic <tomas@sedovic.cz> | 2017-06-30 14:39:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-30 14:39:27 +0200 |
commit | d068121e2e68ddce8f086c281a9f21542df47250 (patch) | |
tree | 723d310d605e001d5e36872fc258cb8a73f051a5 /roles/openstack-stack/tasks | |
parent | 47f262e1d3350786e5890ef85cec212b298df50b (diff) | |
parent | 1409e0a52d45b7781b3a23f3f7eaa8fe09d26cd6 (diff) | |
download | openshift-d068121e2e68ddce8f086c281a9f21542df47250.tar.gz openshift-d068121e2e68ddce8f086c281a9f21542df47250.tar.bz2 openshift-d068121e2e68ddce8f086c281a9f21542df47250.tar.xz openshift-d068121e2e68ddce8f086c281a9f21542df47250.zip |
Merge pull request #522 from bogdando/native_dns_first
Persist DNS configuration for nodes for openstack provider
Diffstat (limited to 'roles/openstack-stack/tasks')
-rw-r--r-- | roles/openstack-stack/tasks/main.yml | 5 | ||||
-rw-r--r-- | roles/openstack-stack/tasks/subnet_update_dns_servers.yaml | 8 |
2 files changed, 13 insertions, 0 deletions
diff --git a/roles/openstack-stack/tasks/main.yml b/roles/openstack-stack/tasks/main.yml index 71c7bbe0d..a53e6350b 100644 --- a/roles/openstack-stack/tasks/main.yml +++ b/roles/openstack-stack/tasks/main.yml @@ -35,6 +35,11 @@ template: "{{ stack_template_path }}" wait: yes +# NOTE(bogdando) OS::Neutron::Subnet doesn't support live updates for +# dns_nameservers, so we can't do that for the "create stack" task. +- include: subnet_update_dns_servers.yaml + when: private_dns_server is defined + - name: cleanup temp files file: path: "{{ stack_template_pre.path }}" diff --git a/roles/openstack-stack/tasks/subnet_update_dns_servers.yaml b/roles/openstack-stack/tasks/subnet_update_dns_servers.yaml new file mode 100644 index 000000000..be4f07b97 --- /dev/null +++ b/roles/openstack-stack/tasks/subnet_update_dns_servers.yaml @@ -0,0 +1,8 @@ +--- +- name: Live update the subnet's DNS servers + os_subnet: + name: openshift-ansible-{{ stack_name }}-subnet + network_name: openshift-ansible-{{ stack_name }}-net + state: present + use_default_subnetpool: yes + dns_nameservers: "{{ [private_dns_server|default(public_dns_nameservers[0])]|union(public_dns_nameservers)|unique }}" |