Installing modules

Sections

To share the Bolt plans and tasks that you've created on the Forge, you can package them into Puppet modules. If you'd like to use a plan or task from a module that you found on the Forge, you can use Bolt to install the module.

Install a module

Before you begin

  • In your Bolt project directory, create a file named Puppetfile.

  • Add any modules stored locally in modules/ to the list. For example,

      mod 'my_awesome_module', local: true

    Bolt deletes any content in modules/ that is not listed in your Puppetfile. If you want to keep the content, but you don't want to manage it with the Puppetfile, move the content to a site-modules directory in your project.

To install a module:

  1. Open Puppetfile in a text editor and add the modules and versions that you want to install. If the modules have dependencies, list those as well. For example:

    # Modules from the Puppet Forge.
    mod 'puppetlabs-apache', '4.1.0'
    mod 'puppetlabs-postgresql', '5.12.0'
    mod 'puppetlabs-puppet_conf', '0.3.0'
    
    # Modules from a Git repository.
    mod 'puppetlabs-haproxy', git: 'https://github.com/puppetlabs/puppetlabs-haproxy.git', ref: 'master'
  2. Run the bolt puppetfile install command. Bolt installs modules to the first directory in the modulepath setting. By default, this is the modules/ subdirectory inside the Bolt project directory. To override this location, update the modulepath setting in the Bolt config file.

Packaged modules

Bolt is packaged with a collection of useful modules to support common workflows.

This list of packaged modules is available in a Puppetfile in the Bolt repository. The modules and supporting documentation are publicly available on the Puppet Forge.

Note: If you installed Bolt as a Ruby Gem, make sure you have installed these core modules.

Modules with useful task and plan content

  • package: Install, uninstall, update, and check the status of packages.

  • service: Manage and inspect the state of services.

  • puppet_conf: Inspect and change the configuration options in the puppet.conf file.

  • facts: Retrieve facts from specified targets.

  • puppet_agent: Install Puppet Agent package.

  • reboot: Manage system reboots.

Core Puppet providers

  • augeas_core: Manage configuration files using Augeas.

  • host_core: Manage host entries in a hosts file.

  • scheduled_task: Provider capable of using the Version 2 Windows API for task management.

  • sshkeys_core: Manage SSH, authorized_keys, and ssh_known_hosts files.

  • zfs_core: Manage zfs and zpool resources.

  • cron_core: Install and manage cron resources.

  • mount_core: Manage mounted filesystems and mount tables.

  • selinux_core: Manage Security-Enhanced Linux.

  • yumrepo_core: Manage client yum repo configurations by parsing INI configuration files.

  • zone_core: Manage Solaris zone resources.

Bolt-specific modules that are not available on the Forge

  • aggregate: Aggregate task, script or command results.

  • canary: Run action against a small number of targets and only if it succeeds will it run on the rest.

  • puppetdb_fact: Collect facts for the specified targets from the configured PuppetDB connection and stores the collected facts on the targets.

🔩 Tip: To override a packaged module with another version, download the version you want and configure your module path to point to it.

Modules that contain helper code for writing your own tasks

🔩 Tip: To override a packaged module with another version, download the version you want and configure your module path to point to it.

📖 Related information

See an issue? Please file a JIRA ticket in our [DOCUMENTATION] project
Puppet sites use proprietary and third-party cookies. By using our sites, you agree to our cookie policy.