Disable systemd-resolved service in nameserver role

This updates the task in the disable-local-nameserver role to
include disabling the systemd-resolved service, as this causes
the entries we update in /etc/resolv.conf to not be honored as
systemd-resolved will use a different set of files for configuring
the nameservers it uses.

See: https://www.freedesktop.org/software/systemd/man/systemd-resolved.service.html

Change-Id: I68a623b7bcb32037b9eeff2d76c7f2cb317cb7d8
Signed-off-by: Steve Wilkerson <sw5822@att.com>
This commit is contained in:
Steve Wilkerson 2019-07-10 09:33:46 -05:00 committed by Steve Wilkerson
parent 09366598b5
commit d83cc610b0

View File

@ -17,7 +17,7 @@
# See the following for the original config: # See the following for the original config:
# * https://github.com/openstack/project-config/blob/0332c33dd134033e0620645c252f82b77e4c16f5/nodepool/elements/nodepool-base/finalise.d/89-unbound # * https://github.com/openstack/project-config/blob/0332c33dd134033e0620645c252f82b77e4c16f5/nodepool/elements/nodepool-base/finalise.d/89-unbound
- name: Disable local nameserver - name: Disable local nameserver and systemd-resolved service
when: ansible_distribution == 'Ubuntu' when: ansible_distribution == 'Ubuntu'
block: block:
- name: update rc.local - name: update rc.local
@ -50,3 +50,10 @@
masked: yes masked: yes
daemon_reload: yes daemon_reload: yes
name: unbound name: unbound
- name: stop systemd-resolved service
systemd:
state: stopped
enabled: no
masked: yes
daemon_reload: yes
name: systemd-resolved