DNS issue with install

The install script will bindly add 8.8.8.8 by default. This is to check
if we even need to do that.

Change-Id: Iaf904497fab047594b6ea18118c1ef6d49488b25
This commit is contained in:
Joe Talerico 2016-06-16 08:45:31 -04:00
parent c168b252b0
commit c4d6f4c882

View File

@ -2,7 +2,12 @@
# #
# Browbeat Install Common # Browbeat Install Common
# #
- name: Check external connectivity
shell: ping google.com -c 1 -q
register: ping
ignore_errors: true
- name: Add DNS record - name: Add DNS record
become: true become: true
lineinfile: dest=/etc/resolv.conf state=present line="nameserver {{ dns_server }}" insertafter="^search" lineinfile: dest=/etc/resolv.conf state=present line="nameserver {{ dns_server }}" insertafter="^search"
when: ping.rc != 0