Ask Your Question
-1

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

Comments

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
0

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 (
   $nameserver1,
   $nameserver2,
)
{
   file { '/etc/resolv.conf'"
     ensure => 'present',
     mode   => '0644',
     content => epp('/module/resolv.epp, {'dnsserver1' => $dnsserver1, 'dnsserver2' => $dnsserver2}),
  }
}
edit flag offensive delete link more

Comments

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

Stats

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

Seen: 58 times

Last updated: Mar 07