Add systemd-resolved config
This commit is contained in:
parent
1353ef643a
commit
8c8ab389c3
2 changed files with 15 additions and 2 deletions
playbooks/roles/software
3
playbooks/roles/software/files/systemd-resolved.conf
Normal file
3
playbooks/roles/software/files/systemd-resolved.conf
Normal file
|
@ -0,0 +1,3 @@
|
|||
[Resolve]
|
||||
DNSOverTLS=opportunistic
|
||||
DNSStubListenerExtra=172.17.0.1
|
|
@ -6,10 +6,20 @@
|
|||
update_cache: true
|
||||
become: true
|
||||
|
||||
- name: Enable systemd-resolved
|
||||
- name: Copy systemd config
|
||||
ansible.builtin.copy:
|
||||
src: systemd-resolved.conf
|
||||
dest: /etc/systemd/resolved.conf
|
||||
mode: "0644"
|
||||
owner: "root"
|
||||
group: "root"
|
||||
become: true
|
||||
register: systemd_resolved_config
|
||||
|
||||
- name: Enable systemd-resolved and (re)start
|
||||
ansible.builtin.systemd_service:
|
||||
name: systemd-resolved.service
|
||||
state: started
|
||||
state: "{{ 'restarted' if systemd_resolved_config.changed else 'started' }}"
|
||||
enabled: true
|
||||
daemon_reload: true
|
||||
become: true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue