Install Puppet Core on Bolt targets
Use a plugin hook to install the current version of Puppet Core on Bolt targets.
If you are using Puppet Enterprise (PE), update Puppet and Facter on targets using PE, not Bolt.
On this page:
Plugin hook locations
You can configure the plugin hook globally to apply to all Bolt projects or configure it in inventory.yaml 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 plugin hook so that installation works successfully.Configure credentials
To complete these steps, you must have Puppet Core credentials. For more information on credentials, see Purchasing Puppet Core and Accessing Puppet Core for limited use for testing or development.
In the computer that you're running Bolt on, 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
To configure a plugin hook globally, add the following code to the top of ~/.puppetlabs/etc/bolt/bolt-defaults.yaml:
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
To configure a plugin hook in inventory.yaml, add 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






