diff --git a/tasks/RedHat.yml b/tasks/RedHat.yml index 556cc15..1785162 100644 --- a/tasks/RedHat.yml +++ b/tasks/RedHat.yml @@ -71,6 +71,15 @@ - Restart NTPD - Restart SSH tags: dns + +- name: Ensure NetworkManager does not fiddle DNS + ini_file: + dest: /etc/NetworkManager/NetworkManager.conf + section: "main" + option: "dns" + value: "none" + backup: yes + when: (ansible_os_family == "RedHat" and ansible_distribution_major_version == "7") - name: Ensure hosts file correct lineinfile: