Forcing DNS resolvers again during configuration.

This commit is contained in:
Emiliano Vavassori 2016-04-28 10:00:35 +02:00
parent c5bcc66166
commit 08532e58d7
1 changed files with 17 additions and 0 deletions

View File

@ -23,6 +23,23 @@
# DNS
# Already preconfigured before (roles/nethcfg/tasks/base.yml)
# reforcing the resolver addresses to the ones configured
- name: Checking DNS configuration
shell: /sbin/e-smith/db configuration printprop dns NameServers
register: chk_dns
changed_when: "'NameServers={{ ansible_local.domain.extdnsserver1 }},{{ ansible_local.domain.extdnsserver2 }}' not in chk_dns.stdout"
ignore_errors: yes
tags: force-resolvers
- name: Configuring DNS resolution
shell: /sbin/e-smith/db configuration setprop dns NameServers {{ ansible_local.domain.extdnsserver1 }},{{ ansible_local.domain.extdnsserver2 }}
when: chk_dns|changed
tags: force-resolvers
- name: Activating correct DNS resolution
shell: "/sbin/e-smith/signal-event nethserver-base-update"
when: chk_dns|changed
tags: force-resolvers
# Avahi