diff options
author | Ryan Cook <rcook@redhat.com> | 2017-06-16 10:27:41 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-16 10:27:41 -0700 |
commit | aa0c8c910a0b8c29afb83d1562c252affcd4a2cb (patch) | |
tree | fbde420c20e6f18fcc8063e268a1525f8848c8d0 /roles/dns-server-detect/tasks | |
parent | 7ba2ef768b25b99f628c88a8e6348a8d0df630a0 (diff) | |
parent | 9369c9dfd722e697f83a225d78c2c1dcd1247976 (diff) | |
download | openshift-aa0c8c910a0b8c29afb83d1562c252affcd4a2cb.tar.gz openshift-aa0c8c910a0b8c29afb83d1562c252affcd4a2cb.tar.bz2 openshift-aa0c8c910a0b8c29afb83d1562c252affcd4a2cb.tar.xz openshift-aa0c8c910a0b8c29afb83d1562c252affcd4a2cb.zip |
Merge pull request #466 from tomassedovic/openstack-provider
Openstack provider
Diffstat (limited to 'roles/dns-server-detect/tasks')
-rw-r--r-- | roles/dns-server-detect/tasks/main.yml | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/roles/dns-server-detect/tasks/main.yml b/roles/dns-server-detect/tasks/main.yml new file mode 100644 index 000000000..183c0a0ca --- /dev/null +++ b/roles/dns-server-detect/tasks/main.yml @@ -0,0 +1,36 @@ +--- +- fail: + msg: 'Missing required private DNS server(s)' + when: + - external_nsupdate_keys['private'] is undefined + - hostvars[groups['dns'][0]] is undefined + +- fail: + msg: 'Missing required public DNS server(s)' + when: + - external_nsupdate_keys['public'] is undefined + - hostvars[groups['dns'][0]] is undefined + +- name: "Set the private DNS server to use the external value (if provided)" + set_fact: + private_dns_server: "{{ external_nsupdate_keys['private']['server'] }}" + when: + - external_nsupdate_keys['private'] is defined + +- name: "Set the private DNS server to use the provisioned value" + set_fact: + private_dns_server: "{{ hostvars[groups['dns'][0]].openstack.private_v4 }}" + when: + - private_dns_server is undefined + +- name: "Set the public DNS server to use the external value (if provided)" + set_fact: + public_dns_server: "{{ external_nsupdate_keys['public']['server'] }}" + when: + - external_nsupdate_keys['public'] is defined + +- name: "Set the public DNS server to use the provisioned value" + set_fact: + public_dns_server: "{{ hostvars[groups['dns'][0]].openstack.public_v4 }}" + when: + - public_dns_server is undefined |