A module is simply a directory tree with the following structure:
After the basic structure definition, we will start with our first modules in the next section.
Note
Because each module needs to have an init.pp
file with a class name the same as its module, we will see that in Foreman the class names are exactly same as the module names.
You can also create a module with the puppet generate module
command. The following are the details of how to write the command. For more details, please refer to https://docs.puppetlabs.com/puppet/latest/reference/modules_fundamentals.html#writing-modules. The command is as follows:
puppet module generate <USERNAME>-<MODULE NAME>