add capability to disable systemd-resolved to base_config role
All checks were successful
/ Ansible Lint (push) Successful in 2m28s
/ Ansible Lint (pull_request) Successful in 2m24s

This commit is contained in:
lilly 2026-04-30 23:12:08 +02:00
commit 58ced1a85e
Signed by: lilly
SSH key fingerprint: SHA256:y9T5GFw2A20WVklhetIxG1+kcg/Ce0shnQmbu1LQ37g
9 changed files with 131 additions and 0 deletions

View file

@ -0,0 +1,25 @@
---
- name: Ensure /etc/resolv.conf is a plain file
tags: [ "deploy_systemd_resolved_config" ]
become: true
ansible.builtin.file:
path: "/etc/resolv.conf"
state: file
- name: Write nameserver config directly into /etc/resolv.conf
tags: [ "deploy_systemd_resolved_config" ]
become: true
ansible.builtin.template:
src: "resolv.conf.j2"
dest: "/etc/resolv.conf"
owner: root
group: root
mode: u=rw,g=r,o=r
- name: Disable systemd-resolved
tags: [ "deploy_systemd_resolved_config" ]
become: true
ansible.builtin.systemd:
name: "systemd-resolved.service"
state: stopped
enabled: false