Enable systemd-resolved DNS resolution mode (#5318)

Change-Id: If3e253a40782e03cde7fc4a91493517ae31fda17
This commit is contained in:
Matthew Mosesohn
2019-11-06 14:33:52 +03:00
committed by Kubernetes Prow Robot
parent 471589f1f4
commit a005d19f6f
5 changed files with 44 additions and 0 deletions

View File

@@ -43,6 +43,13 @@
changed_when: false
check_mode: no
- name: check systemd-resolved
command: systemctl is-active systemd-resolved
register: systemd_resolved_enabled
failed_when: false
changed_when: false
check_mode: no
- name: set dns facts
set_fact:
resolvconf: >-

View File

@@ -0,0 +1,9 @@
---
- name: Write resolved.conf
template:
src: resolved.conf.j2
dest: /etc/systemd/resolved.conf
owner: root
group: root
mode: 0644
notify: Preinstall | Restart systemd-resolved

View File

@@ -32,6 +32,16 @@
when:
- dns_mode != 'none'
- resolvconf_mode == 'host_resolvconf'
- systemd_resolved_enabled.rc != 0
tags:
- bootstrap-os
- resolvconf
- import_tasks: 0061-systemd-resolved.yml
when:
- dns_mode != 'none'
- resolvconf_mode == 'host_resolvconf'
- systemd_resolved_enabled.rc == 0
tags:
- bootstrap-os
- resolvconf