In this guide, you’ll install the puppetlabs-apache module, a Puppet-supported module. Modules contain classes, which are named chunks of Puppet code and are the primary means by which Puppet configures and manages nodes. In the Module Writing Basics for Linux Quick Start Guide you’ll learn more about modules, including customizing and writing your own modules on *nix platforms.
The process for installing a module is the same on both Windows and *nix operating systems.
On the Puppet master, run
puppet module search apache. This command searches for modules from the Puppet Forge with
apache in their names or descriptions.
The search results will display:
Searching http://forgeapi.puppetlabs.com ... NAME DESCRIPTION AUTHOR KEYWORDS puppetlabs-apache Puppet module for apache @puppetlabs apache
To view detailed information about the module, see the Apache module on Forge.
To install the Apache module, run:
puppet module install puppetlabs-apache. The result looks like this:
Preparing to install into /etc/puppetlabs/code/environments/production/modules ... Notice: Downloading from http://forgeapi.puppetlabs.com ... Notice: Installing -- do not interrupt ... /etc/puppetlabs/code/environments/production/modules └── puppetlabs-apache (v1.1.1)
That’s it! You have installed a Puppet module. All of the classes in the module are now available to be assigned to nodes.
A quick note about module directories
By default, Puppet keeps modules in an environment’s
modulepath, which for the production environment defaults to
/etc/puppetlabs/code/environments/production/modules. This includes modules that Puppet installs, those that you download from the Forge, and those you write yourself.
Note: Puppet also creates another module directory:
/opt/puppetlabs/puppet/modules. Don’t modify or add anything in this directory, including modules of your own.
puppetlabs-apacheis a PE-supported module. It is tested and maintained by Puppet, and Puppet Enterprise users are able to file support escalations on these modules.