瀏覽代碼

Merge pull request #591 from day4skiing/dnspri-wildcard

Add wildcard record for Private DNS
Bogdan Dobrelya 8 年之前
父節點
當前提交
baf7f1e5c0
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      playbooks/provisioning/openstack/openstack_dns_records.yml

+ 5 - 0
playbooks/provisioning/openstack/openstack_dns_records.yml

@@ -4,6 +4,11 @@
     private_records: "{{ private_records | default([]) + [ { 'type': 'A', 'hostname': hostvars[item]['ansible_hostname'], 'ip': hostvars[item]['private_v4'] } ] }}"
   with_items: "{{ groups['cluster_hosts'] }}"
 
+- name: "Add wildcard records to the private A records for infrahosts"
+  set_fact:
+    private_records: "{{ private_records | default([]) + [ { 'type': 'A', 'hostname': '*.' + openshift_app_domain, 'ip': hostvars[item]['private_v4'] } ] }}"
+  with_items: "{{ groups['infra_hosts'] }}"
+
 - name: "Set the private DNS server to use the external value (if provided)"
   set_fact:
     nsupdate_server_private: "{{ external_nsupdate_keys['private']['server'] }}"