From 1b7f09ecbe1ca6cfb3b2430f01b3b37f38f48513 Mon Sep 17 00:00:00 2001 From: yohan <783b8c87@scimetis.net> Date: Sun, 6 Oct 2024 13:41:42 +0200 Subject: [PATCH] Use internal_named for resolv.conf. --- .../role_deploy_internal_named/tasks/main.yml | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/roles/role_deploy_internal_named/tasks/main.yml b/roles/role_deploy_internal_named/tasks/main.yml index 83ed445..4bebfa2 100644 --- a/roles/role_deploy_internal_named/tasks/main.yml +++ b/roles/role_deploy_internal_named/tasks/main.yml @@ -61,3 +61,27 @@ - /usr/local/docker-mounted-files/docker-internal_named/named.conf.local:/etc/bind/named.conf.local:z - /mnt/volumes/var_cache_internal_named/data:/var/cache/bind:z become: true + +- name: Disable OVH DNS autoconf + community.general.nmcli: + conn_name: "System eth0" + dns4_ignore_auto: true + dns4: + - 127.0.0.1 + type: ethernet + state: present + become: true + +- name: Remove /etc/NetworkManager/conf.d/99-cloud-init.conf + ansible.builtin.file: + path: "/etc/NetworkManager/conf.d/99-cloud-init.conf" + state: absent + register: cloud_init_removal + become: true + +- name: Restarting NetworkManager + service: + name: NetworkManager + state: restarted + become: true + when: cloud_init_removal is changed