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