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.
- Want to get all the top 5 things to automate with Puppet right now? Go ahead, click the link to download the ebook for free.
- How to avoid the problems caused by forgotten Cron jobs? You can use Puppet Enterprise to manage your Cron resources and jobs.
- 9 Ways IT Automation Makes You More Successful
- Did you miss the first post? Learn how to do your initial setup of Puppet.