Skip to content

Commit

Permalink
Merge pull request #327 from cradle8810/disable_systemd_resolvd
Browse files Browse the repository at this point in the history
Changed for don't use DNSStubListener on systemd-resolved
  • Loading branch information
cradle8810 authored Oct 24, 2024
2 parents 50bd788 + b0ae447 commit 6e1f239
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
7 changes: 7 additions & 0 deletions handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,10 @@
name: zramswap
state: restarted
listen: "Restart zramswap"

- name: "Restart systemd-resolved.service"
ansible.builtin.systemd_service:
name: systemd-resolved.service
state: restarted
enabled: true
listen: "Restart systemd-resolved"
6 changes: 6 additions & 0 deletions tasks/all/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
tags:
- network

- name: "Common / Stop Apt-daily"
ansible.builtin.import_tasks:
file: tasks/all/stop-systemd-resolved.yml
tags:
- network

- name: "Common / Set Timezones"
ansible.builtin.import_tasks:
file: tasks/all/timezone.yml
Expand Down
11 changes: 11 additions & 0 deletions tasks/all/stop-systemd-resolved.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
- name: "Common / Set to don't use DNSStubListener for systemd config"
community.general.ini_file:
path: /etc/systemd/resolved.conf
section: "Resolve"
option: "DNSStubListener"
value: "no"
state: present
no_extra_spaces: true
mode: "644"
notify: "systemd-resolved"

0 comments on commit 6e1f239

Please sign in to comment.