[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 78dbc40..358d81f 100644
--- a/roles/prereqs-common/defaults/main.yml
+++ b/roles/prereqs-common/defaults/main.yml
@@ -1,4 +1,4 @@
-
+---
# Copyright 2017-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,8 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-
----
# prereqs-common/defaults/main.yml
min_memtotal_mb: 48000
@@ -22,6 +20,8 @@
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."
diff --git a/roles/prereqs-common/tasks/main.yml b/roles/prereqs-common/tasks/main.yml
index 2b19b9b..df9e643 100644
--- a/roles/prereqs-common/tasks/main.yml
+++ b/roles/prereqs-common/tasks/main.yml
@@ -34,7 +34,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
@@ -45,7 +45,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:
- 192.5.5.241
- 198.41.0.4