Ask Your Question

Search order for DNS

asked 2017-03-06 12:22:58 -0600

Mahender gravatar image

Hi Team,

Could you please help me to write the manifest for search order for DNS.

Thanks, Mahender

edit retag flag offensive close merge delete


Do you suffer from systemd?

Kai Burghardt gravatar imageKai Burghardt ( 2017-03-15 09:17:33 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-03-07 06:37:37 -0600

puser gravatar image

Typically questions are answered here around Puppet issues / bugs / confusion that type of thing. We don't write full modules for specific problems. You also should provide as much detail as possible, for example I don't know if you need a windows or a Unix solution.

I am going to assume Unix..

You will need to manage /etc/resolv.conf most likely and so you should probably create a template for that file. (epp documentation)

Once you create your template to look like the /etc/resolv.conf file you can then pass the template data.

Your module should be set up like

../module/manifests/init.pp ../module/templates/resolv.epp

Then in your init.pp do something like:

class dnsmgr (
   file { '/etc/resolv.conf'"
     ensure => 'present',
     mode   => '0644',
     content => epp('/module/resolv.epp, {'dnsserver1' => $dnsserver1, 'dnsserver2' => $dnsserver2}),
edit flag offensive delete link more


Thanks for the help. Thanks, Mahender

Mahender gravatar imageMahender ( 2017-03-28 11:28:31 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2017-03-06 12:22:58 -0600

Seen: 60 times

Last updated: Mar 07 '17