Highlighted
  • 1,133 Views

Puppet configuration

Puppet configuration (I want to update the resolv.conf file in all the puppet client machines through puppet agent. Please suggest me with the procedure to update the resolv.conf file in set of servers alone (i.e) instead in all the servers

0 Kudos
7 Replies
Highlighted
Mission Specialist
Mission Specialist
  • 1,130 Views

Re: Puppet configuration

Hi!

You can do that with a simple module using file type  https://puppet.com/docs/puppet/5.5/type.html#file

But if you want something more dynamic i highly recommend to use ENC tool as foreman in order to use a module with a variable, so you can set a different DNS to a group of servers using puppet module parameteres distributed by hostgroups

0 Kudos
Reply
Loading...
Highlighted
  • 1,124 Views

Re: Puppet configuration

Thanks for Link but I want written configuration for my requirement.


@Victor_Acosta wrote:

Hi!

You can do that with a simple module using file type  https://puppet.com/docs/puppet/5.5/type.html#file

But if you want something more dynamic i highly recommend to use ENC tool as foreman in order to use a module with a variable, so you can set a different DNS to a group of servers using puppet module parameteres distributed by hostgroups


 

0 Kudos
Reply
Loading...
Highlighted
Starfighter Starfighter
Starfighter
  • 1,121 Views

Re: Puppet configuration

Most Linux admins will be more than happy to show you where to hunt, but they won't hunt for you, they won't cook for you, and they won't feed you.

If you want to update specific servers, you can, for example, use Puppet node definitions. Configuration will only be applied to the nodes that require it.

To give you an example, if you have a node called webserver.example.com and you want to enforce SELinux on it, you can do so this way:

node 'webserver.example.com' {
  class { selinux:
    mode => 'enforcing',
    type => 'targeted',
  }
}

You can use a similar approach to configure resolv.conf.

Reply
Loading...
Highlighted
  • 1,100 Views

Re: Puppet configuration

I am not comfortable in Puppet if I will get something then I will start learning.I will wait for others to reply.thanks for guidance.

0 Kudos
Reply
Loading...
Highlighted
Starfighter Starfighter
Starfighter
  • 1,095 Views

Re: Puppet configuration

Puppet documentation is amazing, and that's the first place you should look at if you really want to learn the tool. They have a free learning VM that you can download and play around with.

0 Kudos
Reply
Loading...
Highlighted
Mission Specialist
Mission Specialist
  • 1,087 Views

Re: Puppet configuration

okok, so if you want a configuration example i'm going to need some details of your environment.

How is your puppet master deployment? or you're planning to use agents as standalone?

Or if you just need a puppet module and you know how to distribute it, let me know

0 Kudos
Reply
Loading...
Highlighted
Flight Engineer Flight Engineer
Flight Engineer
  • 1,069 Views

Re: Puppet configuration

Mukesh,

how is your environment setup and do you have puppet aready running in your environment .

There are many ways to do this including setting up a template https://puppet.com/docs/puppet/5.3/lang_template.html

or this blog post on how to change a file https://doauto.blog/2013/06/22/how-to-change-a-file-using-puppet/

which explain the file resource and how you can use that 

 

0 Kudos
Reply
Loading...
Join the discussion
You must log in to join this conversation.