[CORD-2220]
Fix DNS record for prereq DNS check
Change-Id: I4fdcfe8067ecddd013e91c40fcb1e63880ff8708
diff --git a/roles/prereqs-common/defaults/main.yml b/roles/prereqs-common/defaults/main.yml
index 1425db4..4397686 100644
--- a/roles/prereqs-common/defaults/main.yml
+++ b/roles/prereqs-common/defaults/main.yml
@@ -1,4 +1,18 @@
---
+# Copyright 2017-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
# prereqs-common/defaults/main.yml
min_memtotal_mb: 48000
@@ -6,8 +20,10 @@
kvm_check: true
-dns_check_domain: wiki.opencord.org
-dns_check_ipv4: 52.9.82.207
+dns_check_domain: corddnscheck.opencord.org
+
+# CNAME record for corddnscheck.opencord.org
+dns_check_record: "wiki.opencord.org."
# obtained from: https://www.iana.org/domains/root/servers
dns_roots:
diff --git a/roles/prereqs-common/tasks/main.yml b/roles/prereqs-common/tasks/main.yml
index 642a1b4..bfdd962 100644
--- a/roles/prereqs-common/tasks/main.yml
+++ b/roles/prereqs-common/tasks/main.yml
@@ -18,7 +18,7 @@
shell: "lsmod | grep kvm_"
- name: DNS Lookup Check
- shell: "dig +short {{ dns_check_domain }} | grep {{ dns_check_ipv4 }}"
+ shell: "dig +short {{ dns_check_domain }} | grep '{{ dns_check_record }}'"
register: dns_lookup_check_result
until: dns_lookup_check_result.rc == 0
retries: 3
@@ -29,7 +29,7 @@
# that: "{{ lookup('dig', dns_check_domain ) == dns_check_ipv4 }}"
- name: DNS Global Root Connectivity Check
- shell: "dig @{{ item }} +trace +short {{ dns_check_domain }} | grep {{ dns_check_ipv4 }}"
+ shell: "dig @{{ item }} +trace +short {{ dns_check_domain }} | grep '{{ dns_check_record }}'"
with_items: "{{ dns_roots }}"
register: dns_global_check_result
until: dns_global_check_result.rc == 0