Install Puppet Core on Bolt targets
You can use Bolt to install Puppet Core on targets by configuring a plugin hook.
For Puppet Enterprise (PE), use the PE documentation to install PE or upgrade PE.
On this page:
Understand plugin hook locations
You can configure the plugin hook globally to apply to all Bolt projects or configure the hook in the inventory.yaml file for a specific group of targets. When you configure a plugin hook globally, use plugin-hooks with a hyphen. When you configure the plugin hook in inventory.yaml, use plugin_hooks with an underscore.
bolt-defaults.yaml and inventory.yaml, rename the hook. In bolt-defaults.yaml the hook must be named plugin-hooks and in inventory.yaml the hook must named plugin_hooks.Configure credentials for Puppet Core
To install Puppet Core on Bolt targets, you must obtain and configure Puppet Core credentials. For information on credentials, see Purchasing Puppet Core and Accessing Puppet Core for limited use for testing or development.
On computer running Bolt, set the environment variable PUPPET_FORGE_TOKEN to the Puppet Core Forge API key associated with your Puppet Core user.
On Linux and macOS:
export PUPPET_FORGE_TOKEN=<API_KEY>
On Windows in cmd.exe:
set PUPPET_FORGE_TOKEN = <API_KEY>
Configure a plugin hook globally
Configure a plugin hook globally by adding the following code to the top of the ~/.puppetlabs/etc/bolt/bolt-defaults.yaml file:
plugin-hooks:
puppet_library:
plugin: task
task: puppet_agent::install
parameters:
collection: puppetcore8
version: latest
password:
_plugin: env_var
var: PUPPET_FORGE_TOKEN
Configure a plugin hook in inventory.yaml
Configure a plugin hook in inventory.yaml by adding the following code to the top of the file:
plugin_hooks:
puppet_library:
plugin: task
task: puppet_agent::install
parameters:
collection: puppetcore8
version: latest
password:
_plugin: env_var
var: PUPPET_FORGE_TOKEN






