Hello,
we would like to manage the */etc/resolv.conf* on our RHEL 7 hosts with ansible. But currently the file is generated by NetworkManager. [root@rhel-t2 ~]# cat /etc/resolv.conf # Generated by NetworkManager search sub.exampelcom example.com nameserver <ip address 1> nameserver <ip address 2> My guess is that the NetworkManager generates this file because I use the DNS1 and DNS2 directives in the ifcfg-file and no PEERDNS=no (see How to make persistent changes to the /etc/resolv.conf? <https://access.redhat.com/solutions/7412>). What would be the best way to get */etc/resolv.conf* under the control of ansible? My first thought was to simply stop using the DNS1 and DNS2 directives in the ifcfg-file and to disable the NetworkManager.service. Without the NetworkManager running I should be able to deploy the */etc/resolv.conf* from an ansible template. What do you think about it? Do you have any other ideas on how to do this? Best regards, Joerg -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/539baf8d-677d-46b3-a027-4390a23e5071%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
