I have some hosts that have explicitly managed resolv.conf files. I have others that rely on NetworkManager, which does many things including writing the resolv.conf file.

Is there a consistent way to manage this information with Puppet, such as some module where I can describe the DNS servers and search orders semantically, then expect the right thing to happen depending on how the host is configured?

Failing that, is there a module that will interface to NetworkManager to do what I want? Writing out an explicit resolv.conf file is fairly trivial, so I need no help with that if I go that route.

1 Answer 1


When you're using NetworkManager, it typically manages /etc/resolv.conf so you don't want to manage that directly with puppet. Instead you want to manage the configuration files which are a bit distribution dependent.

But the upstream default format of configuration is stored in /etc/NetworkManager/system-connections and in that directory you can drop new configuration files e.g. with puppet. Another way is to make it talk to NetworkManager via API (whether directly via D-Bus or through libnm, or even nmcli).

There is still the option of setting dns=none in the main section of /etc/NetworkManager/NetworkManager.conf and handling resolv.conf yourself.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .