Puppet with Satellite 6. Customize puppet modules

Latest response

I am doing Satellite 6 POC. Trying to figure out how to configure puppet modules for different hosts group. I want to manage resolv.conf and ntp.conf with puppet, but wanted to give different values based on server group. For example I have a server group for Dallas servers in which I have a specific set of DNS and NTP servers. For another server group for Austin servers I have different set of DNS and NTP. How I can accomplish this with puppet modules.

Another thing I noticed is the clients are going out of sync. If I run puppet agent --test, it will show up in sync. How to keep the clients in sync automatically ?

Thanks
Biju Joseph.

Responses

Biju,

I haven't personally used Satellite 6, but i've used Puppet / Puppet Enterprise so what I suggest may not fit specifically with your configuration, but some options are (in order of complexity):

Write two completely separate classes and apply them to the servers based on group:

class bijucompany::austin {
  file { "/etc/resolv.conf":
  ... etc.
}

class bijucompany::dallas {
  file { "/etc/resolv.conf":
  ... etc.
}

Use facter to determine the location of the server and then call different file templates / configuration based on result (If facter doesn't provide details that can be used to determine location, write a custom fact)
http://www.puppetcookbook.com/posts/select-a-file-based-on-a-fact.html

Then have templates such as:

resolv.conf_austin
resolv.conf_dallas

Or define a site definition for each site in hiera and reference the hiera configuration from your classes
https://docs.puppetlabs.com/hiera/1/complete_example.html

Someone with more specific Satellite 6 experience will probably be able to answer this more succinctly.

As for keeping clients in sync, is the Puppet daemon running on the clients?

Thanks for the ideas. I am relatively new to puppet. I will try creating different classes for now, and going forward will plan for hiera configuration.

regarding client sync, I feel stupid for not making sure that chkconfig on was not done for puppet. I did a wrong guess that the agent install will do that for me :-(

Thanks again.

One option could be to create a parameterized class. Check out https://access.redhat.com/documentation/en-US/Red_Hat_Satellite/6.0/html/User_Guide/Configuring_Smart_Parameters.html. By doing this, the host which is provisioned could inherit the paraemeter either from teh location, from the host group, or via some dynamic rules. Your class could then use this paremeter to pick the correct file.

One of the reasons why your host keeps being listed as out of sync is that the clock is slewed relative to the Satellite server. Updating the time on the host manually, or through burst settings, will help ensure that the system is shows as synched. The 'out of sync' value is based on timestamp in the report from the puppet agent on the managed host (i.e. when the agent applied to catalog). Hope this helps.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.