Browse Source

Merge pull request #10174 from tzumainn/openstack-fix-dns-record-replace

Fix openstack nsupdate record
OpenShift Merge Robot 6 years ago
parent
commit
79ed252be8
1 changed files with 3 additions and 3 deletions
  1. 3 3
      roles/openshift_openstack/tasks/populate-dns.yml

+ 3 - 3
roles/openshift_openstack/tasks/populate-dns.yml

@@ -6,7 +6,7 @@
     key_algorithm: "{{ openshift_openstack_external_nsupdate_keys['private']['key_algorithm'] | lower }}"
     server: "{{ openshift_openstack_external_nsupdate_keys['private']['server'] }}"
     zone: "{{ openshift_openstack_nsupdate_zone }}"
-    record: "{{ hostvars[item]['ansible_hostname'] + openshift_openstack_private_hostname_suffix + '.' + openshift_openstack_full_dns_domain | replace('.' + openshift_openstack_nsupdate_zone, '') }}"
+    record: "{{ (hostvars[item]['ansible_hostname'] + openshift_openstack_private_hostname_suffix + '.' + openshift_openstack_full_dns_domain) | replace('.' + openshift_openstack_nsupdate_zone, '') }}"
     value: "{{ hostvars[item]['private_v4'] }}"
     type: "A"
     state: "{{ l_dns_record_state | default('present') }}"
@@ -29,7 +29,7 @@
     key_algorithm: "{{ openshift_openstack_external_nsupdate_keys['public']['key_algorithm'] | lower }}"
     server: "{{ openshift_openstack_external_nsupdate_keys['public']['server'] }}"
     zone: "{{ openshift_openstack_nsupdate_zone }}"
-    record: "{{ hostvars[item]['ansible_hostname'] + openshift_openstack_public_hostname_suffix + '.' + openshift_openstack_full_dns_domain | replace('.' + openshift_openstack_nsupdate_zone, '') }}"
+    record: "{{ (hostvars[item]['ansible_hostname'] + openshift_openstack_public_hostname_suffix + '.' + openshift_openstack_full_dns_domain) | replace('.' + openshift_openstack_nsupdate_zone, '') }}"
     value: "{{ hostvars[item]['public_v4'] }}"
     type: "A"
     state: "{{ l_dns_record_state | default('present') }}"
@@ -51,7 +51,7 @@
     key_algorithm: "{{ openshift_openstack_external_nsupdate_keys['public']['key_algorithm'] | lower }}"
     server: "{{ openshift_openstack_external_nsupdate_keys['public']['server'] }}"
     zone: "{{ openshift_openstack_nsupdate_zone }}"
-    record: "{{ '*.' + hostvars[groups.masters[0]].openshift_master_default_subdomain | replace('.' + openshift_openstack_nsupdate_zone, '') }}"
+    record: "{{ ('*.' + hostvars[groups.masters[0]].openshift_master_default_subdomain) | replace('.' + openshift_openstack_nsupdate_zone, '') }}"
     value: "{{ openshift_openstack_public_router_ip }}"
     type: "A"
     state: "{{ l_dns_record_state | default('present') }}"