Defining a simple module to configure time
Modules are collections of manifests and files that define how to install and configure various components. Manifests contain the instructions to apply to a system's configuration. In this recipe, we'll create a simple module to install and configure the NTP daemon.
Getting ready
Puppet has a strict way of organizing modules. Your modules should always be stored in /etc/puppet/modules
. Every module is a directory within this directory, containing the necessary directories that in turn contain manifests, files, templates, and so on.
How to do it…
In this recipe, we'll create the necessary directory structure, manifests, and files to configure your system's time. Perform the following steps:
Create
ntp/manifests
in/etc/puppet/modules
via the following command:~]# mkdir -p /etc/puppet/modules/ntp/manifests
Create
ntp/templates
to house all the templates used by the puppet module through the following:~]# mkdir -p /etc/puppet/modules/ntp/templates
Now...