Writing your own modules
As we've seen, a Puppet module is a way of grouping together a set of related code and resources which perform some particular task, such as managing the Apache web server, or dealing with archive files. But how do you actually create a module? In this section we'll develop a module of our own to manage the Network Time Protocol (NTP) service, familiar to most system administrators as the easiest way to keep server clocks synchronized with the Internet time standard. (Of course, it's not necessary to write your own module for this, because a perfectly good one exists on the Puppet Forge. But we'll do so anyway, for learning purposes.)
Creating a repo for your module
If we're going to use our new module alongside others that we've installed from Puppet Forge, then we should create a new Git repo just for our module. Then we can add its details to our Puppetfile and have r10k
install it for us.
If you've already worked through Chapter 3, Managing your Puppet code with...