homeblogautomating puppet standardizing ntp

Automating with Puppet: Standardizing NTP

Editor's Note: This post is a taste of what you'll get in our ebook about about automating routine IT tasks with Puppet, The Top 5 Things to Automate with Puppet Right Now. Download it for free to read the rest.

NTP is usually configured when a server is installed and never touched again. As such, it’s unlikely the NTP configurations are consistent across all servers in the infrastructure. Time discrepancies between servers can cause strange failures and it can be difficult to track down the root cause.

The NTP module takes care of that problem. Using the NTP module, all your servers will have consistent settings. If you need to change a time server, you simply update the Puppet code and you’re done.

Standardizing NTP across your entire environment is very easy with Puppet. Simply add the NTP module and its dependencies to your puppetfile:

Then use the NTP module inside your base SOE like so:

This will set up NTP on all your systems in its default state. If you would like to change the way it is configured, simply pass parameters to the ntp class. Here is a common example of managing NTP with custom servers:

Because this is part of the base profile that we created in Task 1, and every role includes the base profile, it will get applied to every server without us needing to change anything.

And that’s it, you’ve successfully standardized NTP across your infrastructure with Puppet. Watch this space for the rest of our series to learn about other common processes you can automate with Puppet.

Learn more