This week we're going to begin our coverage of the Puppet Module Tool (PMT). The PMT is the command-line interface to the Puppet Forge—an online repository for re-usable Puppet modules. As of Puppet 2.7.14 and Puppet Enterprise 2.5 PMT is no longer a separate product; it's now part of Puppet Core. What this means for you is that PMT is ready-to-go out of the box.
The latest version of PMT offers a few new features over the previous stand-alone tool:
- Search the Puppet Forge from the command line
- List, upgrade, and uninstall modules
- Automatically resolve and install module dependencies
In this post we'll take a look at the new search and list commands.
The search command searches a repository for modules whose names, descriptions, or keywords match the provided search term. For example, if we search for the term "tomcat", we would get the following output:
Notice the results include modules that match based on keywords and the module name.
The list command lists the installed Puppet modules in our modulepath.
Notice the apache module has a version number of (???). This is because an apache module is installed but does not have a valid metadata file. If you would like to see how the installed modules relate to each other, use the
The list command will also report any issues with your module path:
The warning message is telling us that we are missing the puppetlabs-mysql module, which is required by the puppetlabs-bacula module. The PMT list command even lets us know which version of puppetlabs-mysql is required. A lot of work when into making the output communicate effectively. Notice the visual label used to highlight the "UNMET DEPENDENCY" in the tree output.
The new PMT is now bundled with Puppet and is ready to use out of the box. The new list and search commands allow you to search for modules on the Forge, and list currently installed modules. The list command also sports the ability to report issues with our installed modules.
Join us next week as we discover how to streamline the installation and maintenance of modules available on the Puppet Forge. We'll wrap up our coverage of the PMT by taking look at the new upgrade and uninstall commands. We'll also explore the enhancements made to the install command which greatly simplifies installing modules and their dependencies.