*nix shell commands

Sections

Command syntax

Bolt shell commands follow a noun-verb convention.

To view a full list of available commands, use the bolt help command:

bolt help

Commands

These subcommands, actions, and options are available for Bolt.

apply

Apply Puppet manifest code on the specified targets.

Usage

bolt apply [manifest.pp] [options]
Option Description
-t, --targets TARGETS Identifies the targets of command.

Enter a comma-separated list of target URIs or group names.

Or read a target list from an input file '@<file>' or stdin '-'.

Example: --targets localhost,target_group,ssh://nix.com:23,winrm://windows.puppet.com

URI format is [protocol://]host[:port]

SSH is the default protocol; may be ssh, winrm, pcp, local, docker, remote

For Windows targets, specify the winrm:// protocol if it has not be configured

For SSH, port defaults to `22`

For WinRM, port defaults to `5985` or `5986` based on the --[no-]ssl setting

-q, --query QUERY Query PuppetDB to determine the targets
--rerun FILTER Retry on targets from the last run

'all' all targets that were part of the last run.

'failure' targets that failed in the last run.

'success' targets that succeeded in the last run.

--description DESCRIPTION Deprecated. Description to use for the job
-u, --user USER User to authenticate as
-p, --password PASSWORD Password to authenticate with
--password-prompt Prompt for user to input password
--private-key KEY Path to private ssh key to authenticate with
--[no-]host-key-check Check host keys with SSH
--[no-]ssl Use SSL with WinRM
--[no-]ssl-verify Verify remote host SSL certificate with WinRM
--run-as USER User to run as using privilege escalation
--sudo-password PASSWORD Password for privilege escalation
--sudo-password-prompt Prompt for user to input escalation password
--sudo-executable EXEC Specify an executable for running as another user.

This option is experimental.

-c, --concurrency CONCURRENCY Maximum number of simultaneous connections
-i, --inventoryfile PATH Specify where to load inventory from (default: ~/.puppetlabs/bolt/inventory.yaml)
--[no-]save-rerun Whether to update the rerun file after this command.
--[no-]cleanup Whether to clean up temporary files created on targets
--project PATH Path to load the Bolt project from (default: autodiscovered from current dir)
--configfile PATH Deprecated. Specify where to load config from (default:

~/.puppetlabs/bolt/bolt.yaml). Directory containing bolt.yaml will be

used as the project directory.

--boltdir PATH Deprecated. Specify what project to load config from (default:

autodiscovered from current working dir)

-m, --modulepath MODULES List of directories containing modules, separated by ':'

Directories are case-sensitive

--transport TRANSPORT Specify a default transport: ssh, winrm, pcp, local, docker, remote
--connect-timeout TIMEOUT Connection timeout in seconds (defaults vary)
--[no-]tty Request a pseudo TTY on targets that support it
--[no-]native-ssh Whether to shell out to native SSH or use the net-ssh Ruby library.

This option is experimental

--ssh-command EXEC Executable to use instead of the net-ssh Ruby library.

This option is experimental.

--copy-command EXEC Command to copy files to remote hosts if using native SSH.

This option is experimental.

--format FORMAT Output format to use: human or json
--[no-]color Whether to show output in color
-v, --[no-]verbose Display verbose logging
--trace Display error stack traces
-h, --help Display help
--version Display the version
--debug Display debug logging
--log-level LEVEL Set the log level for the console. Available options are

trace, debug, info, warn, error, fatal, any.

--noop See what changes Bolt will make without actually executing the changes
-e, --execute CODE Puppet manifest code to apply to the targets
--compile-concurrency CONCURRENCY Maximum number of simultaneous manifest block compiles (default: number of cores)
--hiera-config PATH Specify where to load Hiera config from (default: ~/.puppetlabs/bolt/hiera.yaml)

command run

Run a command on the specified targets.

Usage

bolt command run <command> [options]
Option Description
-t, --targets TARGETS Identifies the targets of command.

Enter a comma-separated list of target URIs or group names.

Or read a target list from an input file '@<file>' or stdin '-'.

Example: --targets localhost,target_group,ssh://nix.com:23,winrm://windows.puppet.com

URI format is [protocol://]host[:port]

SSH is the default protocol; may be ssh, winrm, pcp, local, docker, remote

For Windows targets, specify the winrm:// protocol if it has not be configured

For SSH, port defaults to `22`

For WinRM, port defaults to `5985` or `5986` based on the --[no-]ssl setting

-q, --query QUERY Query PuppetDB to determine the targets
--rerun FILTER Retry on targets from the last run

'all' all targets that were part of the last run.

'failure' targets that failed in the last run.

'success' targets that succeeded in the last run.

--description DESCRIPTION Deprecated. Description to use for the job
-u, --user USER User to authenticate as
-p, --password PASSWORD Password to authenticate with
--password-prompt Prompt for user to input password
--private-key KEY Path to private ssh key to authenticate with
--[no-]host-key-check Check host keys with SSH
--[no-]ssl Use SSL with WinRM
--[no-]ssl-verify Verify remote host SSL certificate with WinRM
--run-as USER User to run as using privilege escalation
--sudo-password PASSWORD Password for privilege escalation
--sudo-password-prompt Prompt for user to input escalation password
--sudo-executable EXEC Specify an executable for running as another user.

This option is experimental.

-c, --concurrency CONCURRENCY Maximum number of simultaneous connections
-i, --inventoryfile PATH Specify where to load inventory from (default: ~/.puppetlabs/bolt/inventory.yaml)
--[no-]save-rerun Whether to update the rerun file after this command.
--[no-]cleanup Whether to clean up temporary files created on targets
--project PATH Path to load the Bolt project from (default: autodiscovered from current dir)
--configfile PATH Deprecated. Specify where to load config from (default:

~/.puppetlabs/bolt/bolt.yaml). Directory containing bolt.yaml will be

used as the project directory.

--boltdir PATH Deprecated. Specify what project to load config from (default:

autodiscovered from current working dir)

-m, --modulepath MODULES List of directories containing modules, separated by ':'

Directories are case-sensitive

--transport TRANSPORT Specify a default transport: ssh, winrm, pcp, local, docker, remote
--connect-timeout TIMEOUT Connection timeout in seconds (defaults vary)
--[no-]tty Request a pseudo TTY on targets that support it
--[no-]native-ssh Whether to shell out to native SSH or use the net-ssh Ruby library.

This option is experimental

--ssh-command EXEC Executable to use instead of the net-ssh Ruby library.

This option is experimental.

--copy-command EXEC Command to copy files to remote hosts if using native SSH.

This option is experimental.

--format FORMAT Output format to use: human or json
--[no-]color Whether to show output in color
-v, --[no-]verbose Display verbose logging
--trace Display error stack traces
-h, --help Display help
--version Display the version
--debug Display debug logging
--log-level LEVEL Set the log level for the console. Available options are

trace, debug, info, warn, error, fatal, any.

--env-var ENVIRONMENT_VARIABLES Environment variables to set on the target

file download

Download a file or directory from one or more targets.

Downloaded files and directories are saved to the a subdirectory matching the target's name under the destination directory. The destination directory is expanded relative to the downloads subdirectory of the project directory.

Usage

bolt file download <src> <dest> [options]
Option Description
-t, --targets TARGETS Identifies the targets of command.

Enter a comma-separated list of target URIs or group names.

Or read a target list from an input file '@<file>' or stdin '-'.

Example: --targets localhost,target_group,ssh://nix.com:23,winrm://windows.puppet.com

URI format is [protocol://]host[:port]

SSH is the default protocol; may be ssh, winrm, pcp, local, docker, remote

For Windows targets, specify the winrm:// protocol if it has not be configured

For SSH, port defaults to `22`

For WinRM, port defaults to `5985` or `5986` based on the --[no-]ssl setting

-q, --query QUERY Query PuppetDB to determine the targets
--rerun FILTER Retry on targets from the last run

'all' all targets that were part of the last run.

'failure' targets that failed in the last run.

'success' targets that succeeded in the last run.

--description DESCRIPTION Deprecated. Description to use for the job
-u, --user USER User to authenticate as
-p, --password PASSWORD Password to authenticate with
--password-prompt Prompt for user to input password
--private-key KEY Path to private ssh key to authenticate with
--[no-]host-key-check Check host keys with SSH
--[no-]ssl Use SSL with WinRM
--[no-]ssl-verify Verify remote host SSL certificate with WinRM
--run-as USER User to run as using privilege escalation
--sudo-password PASSWORD Password for privilege escalation
--sudo-password-prompt Prompt for user to input escalation password
--sudo-executable EXEC Specify an executable for running as another user.

This option is experimental.

-c, --concurrency CONCURRENCY Maximum number of simultaneous connections
-i, --inventoryfile PATH Specify where to load inventory from (default: ~/.puppetlabs/bolt/inventory.yaml)
--[no-]save-rerun Whether to update the rerun file after this command.
--[no-]cleanup Whether to clean up temporary files created on targets
--project PATH Path to load the Bolt project from (default: autodiscovered from current dir)
--configfile PATH Deprecated. Specify where to load config from (default:

~/.puppetlabs/bolt/bolt.yaml). Directory containing bolt.yaml will be

used as the project directory.

--boltdir PATH Deprecated. Specify what project to load config from (default:

autodiscovered from current working dir)

-m, --modulepath MODULES List of directories containing modules, separated by ':'

Directories are case-sensitive

--transport TRANSPORT Specify a default transport: ssh, winrm, pcp, local, docker, remote
--connect-timeout TIMEOUT Connection timeout in seconds (defaults vary)
--[no-]tty Request a pseudo TTY on targets that support it
--[no-]native-ssh Whether to shell out to native SSH or use the net-ssh Ruby library.

This option is experimental

--ssh-command EXEC Executable to use instead of the net-ssh Ruby library.

This option is experimental.

--copy-command EXEC Command to copy files to remote hosts if using native SSH.

This option is experimental.

--format FORMAT Output format to use: human or json
--[no-]color Whether to show output in color
-v, --[no-]verbose Display verbose logging
--trace Display error stack traces
-h, --help Display help
--version Display the version
--debug Display debug logging
--log-level LEVEL Set the log level for the console. Available options are

trace, debug, info, warn, error, fatal, any.

file upload

Upload a local file or directory.

Usage

bolt file upload <src> <dest> [options]
Option Description
-t, --targets TARGETS Identifies the targets of command.

Enter a comma-separated list of target URIs or group names.

Or read a target list from an input file '@<file>' or stdin '-'.

Example: --targets localhost,target_group,ssh://nix.com:23,winrm://windows.puppet.com

URI format is [protocol://]host[:port]

SSH is the default protocol; may be ssh, winrm, pcp, local, docker, remote

For Windows targets, specify the winrm:// protocol if it has not be configured

For SSH, port defaults to `22`

For WinRM, port defaults to `5985` or `5986` based on the --[no-]ssl setting

-q, --query QUERY Query PuppetDB to determine the targets
--rerun FILTER Retry on targets from the last run

'all' all targets that were part of the last run.

'failure' targets that failed in the last run.

'success' targets that succeeded in the last run.

--description DESCRIPTION Deprecated. Description to use for the job
-u, --user USER User to authenticate as
-p, --password PASSWORD Password to authenticate with
--password-prompt Prompt for user to input password
--private-key KEY Path to private ssh key to authenticate with
--[no-]host-key-check Check host keys with SSH
--[no-]ssl Use SSL with WinRM
--[no-]ssl-verify Verify remote host SSL certificate with WinRM
--run-as USER User to run as using privilege escalation
--sudo-password PASSWORD Password for privilege escalation
--sudo-password-prompt Prompt for user to input escalation password
--sudo-executable EXEC Specify an executable for running as another user.

This option is experimental.

-c, --concurrency CONCURRENCY Maximum number of simultaneous connections
-i, --inventoryfile PATH Specify where to load inventory from (default: ~/.puppetlabs/bolt/inventory.yaml)
--[no-]save-rerun Whether to update the rerun file after this command.
--[no-]cleanup Whether to clean up temporary files created on targets
--project PATH Path to load the Bolt project from (default: autodiscovered from current dir)
--configfile PATH Deprecated. Specify where to load config from (default:

~/.puppetlabs/bolt/bolt.yaml). Directory containing bolt.yaml will be

used as the project directory.

--boltdir PATH Deprecated. Specify what project to load config from (default:

autodiscovered from current working dir)

-m, --modulepath MODULES List of directories containing modules, separated by ':'

Directories are case-sensitive

--transport TRANSPORT Specify a default transport: ssh, winrm, pcp, local, docker, remote
--connect-timeout TIMEOUT Connection timeout in seconds (defaults vary)
--[no-]tty Request a pseudo TTY on targets that support it
--[no-]native-ssh Whether to shell out to native SSH or use the net-ssh Ruby library.

This option is experimental

--ssh-command EXEC Executable to use instead of the net-ssh Ruby library.

This option is experimental.

--copy-command EXEC Command to copy files to remote hosts if using native SSH.

This option is experimental.

--format FORMAT Output format to use: human or json
--[no-]color Whether to show output in color
-v, --[no-]verbose Display verbose logging
--trace Display error stack traces
-h, --help Display help
--version Display the version
--debug Display debug logging
--log-level LEVEL Set the log level for the console. Available options are

trace, debug, info, warn, error, fatal, any.

--tmpdir DIR The directory to upload and execute temporary files on the target

group show

Show the list of groups in the inventory.

Usage

bolt group show [options]
Option Description
-h, --help Display help
--version Display the version
--debug Display debug logging
--log-level LEVEL Set the log level for the console. Available options are

trace, debug, info, warn, error, fatal, any.

--project PATH Path to load the Bolt project from (default: autodiscovered from current dir)
--configfile PATH Deprecated. Specify where to load config from (default:

~/.puppetlabs/bolt/bolt.yaml). Directory containing bolt.yaml will be

used as the project directory.

--boltdir PATH Deprecated. Specify what project to load config from (default:

autodiscovered from current working dir)

--format FORMAT Output format to use: human or json
-i, --inventoryfile PATH Specify where to load inventory from (default: ~/.puppetlabs/bolt/inventory.yaml)

guide

View guides for Bolt's concepts and features.

Omitting a topic will display a list of available guides, while providing a topic will display the relevant guide.

Usage

bolt guide [topic] [options]
Option Description
-h, --help Display help
--version Display the version
--debug Display debug logging
--log-level LEVEL Set the log level for the console. Available options are

trace, debug, info, warn, error, fatal, any.

--format FORMAT Output format to use: human or json

inventory show

Show the list of targets an action would run on.

Usage

bolt inventory show [options]
Option Description
-t, --targets TARGETS Identifies the targets of command.

Enter a comma-separated list of target URIs or group names.

Or read a target list from an input file '@<file>' or stdin '-'.

Example: --targets localhost,target_group,ssh://nix.com:23,winrm://windows.puppet.com

URI format is [protocol://]host[:port]

SSH is the default protocol; may be ssh, winrm, pcp, local, docker, remote

For Windows targets, specify the winrm:// protocol if it has not be configured

For SSH, port defaults to `22`

For WinRM, port defaults to `5985` or `5986` based on the --[no-]ssl setting

-q, --query QUERY Query PuppetDB to determine the targets
--rerun FILTER Retry on targets from the last run

'all' all targets that were part of the last run.

'failure' targets that failed in the last run.

'success' targets that succeeded in the last run.

--description DESCRIPTION Deprecated. Description to use for the job
-h, --help Display help
--version Display the version
--debug Display debug logging
--log-level LEVEL Set the log level for the console. Available options are

trace, debug, info, warn, error, fatal, any.

--project PATH Path to load the Bolt project from (default: autodiscovered from current dir)
--configfile PATH Deprecated. Specify where to load config from (default:

~/.puppetlabs/bolt/bolt.yaml). Directory containing bolt.yaml will be

used as the project directory.

--boltdir PATH Deprecated. Specify what project to load config from (default:

autodiscovered from current working dir)

--format FORMAT Output format to use: human or json
-i, --inventoryfile PATH Specify where to load inventory from (default: ~/.puppetlabs/bolt/inventory.yaml)
--detail Show resolved configuration for the targets

module add

Add a module to the project.

Module declarations are loaded from the project's configuration file. Bolt will automatically resolve all module dependencies, generate a Puppetfile, and install the modules.

The module command is only supported when a project is configured with the 'modules' key.

Usage

bolt module add <module> [options]
Option Description
-h, --help Display help
--version Display the version
--debug Display debug logging
--log-level LEVEL Set the log level for the console. Available options are

trace, debug, info, warn, error, fatal, any.

--project PATH Path to load the Bolt project from (default: autodiscovered from current dir)
--configfile PATH Deprecated. Specify where to load config from (default:

~/.puppetlabs/bolt/bolt.yaml). Directory containing bolt.yaml will be

used as the project directory.

--boltdir PATH Deprecated. Specify what project to load config from (default:

autodiscovered from current working dir)

module generate-types

Generate type references to register in plans.

The module command is only supported when a project is configured with the 'modules' key.

Usage

bolt module generate-types [options]
Option Description
-h, --help Display help
--version Display the version
--debug Display debug logging
--log-level LEVEL Set the log level for the console. Available options are

trace, debug, info, warn, error, fatal, any.

--project PATH Path to load the Bolt project from (default: autodiscovered from current dir)
--configfile PATH Deprecated. Specify where to load config from (default:

~/.puppetlabs/bolt/bolt.yaml). Directory containing bolt.yaml will be

used as the project directory.

--boltdir PATH Deprecated. Specify what project to load config from (default:

autodiscovered from current working dir)

-m, --modulepath MODULES List of directories containing modules, separated by ':'

Directories are case-sensitive

module install

Install the project's modules.

Module declarations are loaded from the project's configuration file. Bolt will automatically resolve all module dependencies, generate a Puppetfile, and install the modules.

Usage

bolt module install [options]
Option Description
-h, --help Display help
--version Display the version
--debug Display debug logging
--log-level LEVEL Set the log level for the console. Available options are

trace, debug, info, warn, error, fatal, any.

--project PATH Path to load the Bolt project from (default: autodiscovered from current dir)
--configfile PATH Deprecated. Specify where to load config from (default:

~/.puppetlabs/bolt/bolt.yaml). Directory containing bolt.yaml will be

used as the project directory.

--boltdir PATH Deprecated. Specify what project to load config from (default:

autodiscovered from current working dir)

--force Force a destructive action
--[no-]resolve Use --no-resolve to install modules listed in the Puppetfile without resolving modules configured

in Bolt project configuration

module show

List modules available to the Bolt project.

The module command is only supported when a project is configured with the 'modules' key.

Usage

bolt module show [options]
Option Description
-h, --help Display help
--version Display the version
--debug Display debug logging
--log-level LEVEL Set the log level for the console. Available options are

trace, debug, info, warn, error, fatal, any.

--project PATH Path to load the Bolt project from (default: autodiscovered from current dir)
--configfile PATH Deprecated. Specify where to load config from (default:

~/.puppetlabs/bolt/bolt.yaml). Directory containing bolt.yaml will be

used as the project directory.

--boltdir PATH Deprecated. Specify what project to load config from (default:

autodiscovered from current working dir)

-m, --modulepath MODULES List of directories containing modules, separated by ':'

Directories are case-sensitive

plan convert

Convert a YAML plan to a Puppet language plan and print the converted plan to stdout.

Converting a YAML plan may result in a plan that is syntactically correct but has different behavior. Always verify a converted plan's functionality. Note that the converted plan is not written to a file.

Usage

bolt plan convert <path> [options]
Option Description
-h, --help Display help
--version Display the version
--debug Display debug logging
--log-level LEVEL Set the log level for the console. Available options are

trace, debug, info, warn, error, fatal, any.

--project PATH Path to load the Bolt project from (default: autodiscovered from current dir)
--configfile PATH Deprecated. Specify where to load config from (default:

~/.puppetlabs/bolt/bolt.yaml). Directory containing bolt.yaml will be

used as the project directory.

--boltdir PATH Deprecated. Specify what project to load config from (default:

autodiscovered from current working dir)

-m, --modulepath MODULES List of directories containing modules, separated by ':'

Directories are case-sensitive

plan new

Create a new plan in the current project.

Usage

bolt plan new <plan> [options]
Option Description
-h, --help Display help
--version Display the version
--debug Display debug logging
--log-level LEVEL Set the log level for the console. Available options are

trace, debug, info, warn, error, fatal, any.

--project PATH Path to load the Bolt project from (default: autodiscovered from current dir)
--configfile PATH Deprecated. Specify where to load config from (default:

~/.puppetlabs/bolt/bolt.yaml). Directory containing bolt.yaml will be

used as the project directory.

--boltdir PATH Deprecated. Specify what project to load config from (default:

autodiscovered from current working dir)

--pp Create a new Puppet language plan.

plan run

Run a plan on the specified targets.

Usage

bolt plan run <plan> [parameters] [options]
Option Description
-t, --targets TARGETS Identifies the targets of command.

Enter a comma-separated list of target URIs or group names.

Or read a target list from an input file '@<file>' or stdin '-'.

Example: --targets localhost,target_group,ssh://nix.com:23,winrm://windows.puppet.com

URI format is [protocol://]host[:port]

SSH is the default protocol; may be ssh, winrm, pcp, local, docker, remote

For Windows targets, specify the winrm:// protocol if it has not be configured

For SSH, port defaults to `22`

For WinRM, port defaults to `5985` or `5986` based on the --[no-]ssl setting

-q, --query QUERY Query PuppetDB to determine the targets
--rerun FILTER Retry on targets from the last run

'all' all targets that were part of the last run.

'failure' targets that failed in the last run.

'success' targets that succeeded in the last run.

--description DESCRIPTION Deprecated. Description to use for the job
-u, --user USER User to authenticate as
-p, --password PASSWORD Password to authenticate with
--password-prompt Prompt for user to input password
--private-key KEY Path to private ssh key to authenticate with
--[no-]host-key-check Check host keys with SSH
--[no-]ssl Use SSL with WinRM
--[no-]ssl-verify Verify remote host SSL certificate with WinRM
--run-as USER User to run as using privilege escalation
--sudo-password PASSWORD Password for privilege escalation
--sudo-password-prompt Prompt for user to input escalation password
--sudo-executable EXEC Specify an executable for running as another user.

This option is experimental.

-c, --concurrency CONCURRENCY Maximum number of simultaneous connections
-i, --inventoryfile PATH Specify where to load inventory from (default: ~/.puppetlabs/bolt/inventory.yaml)
--[no-]save-rerun Whether to update the rerun file after this command.
--[no-]cleanup Whether to clean up temporary files created on targets
--project PATH Path to load the Bolt project from (default: autodiscovered from current dir)
--configfile PATH Deprecated. Specify where to load config from (default:

~/.puppetlabs/bolt/bolt.yaml). Directory containing bolt.yaml will be

used as the project directory.

--boltdir PATH Deprecated. Specify what project to load config from (default:

autodiscovered from current working dir)

-m, --modulepath MODULES List of directories containing modules, separated by ':'

Directories are case-sensitive

--transport TRANSPORT Specify a default transport: ssh, winrm, pcp, local, docker, remote
--connect-timeout TIMEOUT Connection timeout in seconds (defaults vary)
--[no-]tty Request a pseudo TTY on targets that support it
--[no-]native-ssh Whether to shell out to native SSH or use the net-ssh Ruby library.

This option is experimental

--ssh-command EXEC Executable to use instead of the net-ssh Ruby library.

This option is experimental.

--copy-command EXEC Command to copy files to remote hosts if using native SSH.

This option is experimental.

--format FORMAT Output format to use: human or json
--[no-]color Whether to show output in color
-v, --[no-]verbose Display verbose logging
--trace Display error stack traces
-h, --help Display help
--version Display the version
--debug Display debug logging
--log-level LEVEL Set the log level for the console. Available options are

trace, debug, info, warn, error, fatal, any.

--params PARAMETERS Parameters to a task or plan as json, a json file '@<file>', or on stdin '-'
--compile-concurrency CONCURRENCY Maximum number of simultaneous manifest block compiles (default: number of cores)
--tmpdir DIR The directory to upload and execute temporary files on the target
--hiera-config PATH Specify where to load Hiera config from (default: ~/.puppetlabs/bolt/hiera.yaml)

plan show

Show available plans and plan documentation.

Omitting the name of a plan will display a list of plans available in the Bolt project.

Providing the name of a plan will display detailed documentation for the plan, including a list of available parameters.

Usage

bolt plan show [plan] [options]
Option Description
-h, --help Display help
--version Display the version
--debug Display debug logging
--log-level LEVEL Set the log level for the console. Available options are

trace, debug, info, warn, error, fatal, any.

--project PATH Path to load the Bolt project from (default: autodiscovered from current dir)
--configfile PATH Deprecated. Specify where to load config from (default:

~/.puppetlabs/bolt/bolt.yaml). Directory containing bolt.yaml will be

used as the project directory.

--boltdir PATH Deprecated. Specify what project to load config from (default:

autodiscovered from current working dir)

-m, --modulepath MODULES List of directories containing modules, separated by ':'

Directories are case-sensitive

--filter FILTER Filter tasks and plans by a matching substring
--format FORMAT Output format to use: human or json

project init

Create a new Bolt project in the current working directory.

Specify a name for the Bolt project. Defaults to the basename of the current working directory.

Usage

bolt project init [name] [options]
Option Description
-h, --help Display help
--version Display the version
--debug Display debug logging
--log-level LEVEL Set the log level for the console. Available options are

trace, debug, info, warn, error, fatal, any.

--modules MODULES A comma-separated list of modules to install from the Puppet Forge

when initializing a project. Resolves and installs all dependencies.

project migrate

Migrate a Bolt project to use current best practices and the latest version of configuration files.

Usage

bolt project migrate [options]
Option Description
-h, --help Display help
--version Display the version
--debug Display debug logging
--log-level LEVEL Set the log level for the console. Available options are

trace, debug, info, warn, error, fatal, any.

--project PATH Path to load the Bolt project from (default: autodiscovered from current dir)
--configfile PATH Deprecated. Specify where to load config from (default:

~/.puppetlabs/bolt/bolt.yaml). Directory containing bolt.yaml will be

used as the project directory.

--boltdir PATH Deprecated. Specify what project to load config from (default:

autodiscovered from current working dir)

-i, --inventoryfile PATH Specify where to load inventory from (default: ~/.puppetlabs/bolt/inventory.yaml)

puppetfile generate-types

Generate type references to register in plans.

Usage

bolt puppetfile generate-types [options]
Option Description
-h, --help Display help
--version Display the version
--debug Display debug logging
--log-level LEVEL Set the log level for the console. Available options are

trace, debug, info, warn, error, fatal, any.

--project PATH Path to load the Bolt project from (default: autodiscovered from current dir)
--configfile PATH Deprecated. Specify where to load config from (default:

~/.puppetlabs/bolt/bolt.yaml). Directory containing bolt.yaml will be

used as the project directory.

--boltdir PATH Deprecated. Specify what project to load config from (default:

autodiscovered from current working dir)

-m, --modulepath MODULES List of directories containing modules, separated by ':'

Directories are case-sensitive

puppetfile install

Install modules from a Puppetfile into a project

Usage

bolt puppetfile install [options]
Option Description
-h, --help Display help
--version Display the version
--debug Display debug logging
--log-level LEVEL Set the log level for the console. Available options are

trace, debug, info, warn, error, fatal, any.

--project PATH Path to load the Bolt project from (default: autodiscovered from current dir)
--configfile PATH Deprecated. Specify where to load config from (default:

~/.puppetlabs/bolt/bolt.yaml). Directory containing bolt.yaml will be

used as the project directory.

--boltdir PATH Deprecated. Specify what project to load config from (default:

autodiscovered from current working dir)

-m, --modulepath MODULES List of directories containing modules, separated by ':'

Directories are case-sensitive

--puppetfile PATH Deprecated. Specify a Puppetfile to use when installing modules.

(default: ~/.puppetlabs/bolt/Puppetfile)

Modules are installed in the current project.

puppetfile show-modules

List modules available to the Bolt project.

Usage

bolt puppetfile show-modules [options]
Option Description
-h, --help Display help
--version Display the version
--debug Display debug logging
--log-level LEVEL Set the log level for the console. Available options are

trace, debug, info, warn, error, fatal, any.

--project PATH Path to load the Bolt project from (default: autodiscovered from current dir)
--configfile PATH Deprecated. Specify where to load config from (default:

~/.puppetlabs/bolt/bolt.yaml). Directory containing bolt.yaml will be

used as the project directory.

--boltdir PATH Deprecated. Specify what project to load config from (default:

autodiscovered from current working dir)

-m, --modulepath MODULES List of directories containing modules, separated by ':'

Directories are case-sensitive

script run

Run a script on the specified targets.

Arguments passed to a script are passed literally and are not interpolated by the shell. Any arguments containing spaces or special characters should be quoted.

Usage

bolt script run <script> [arguments] [options]
Option Description
-t, --targets TARGETS Identifies the targets of command.

Enter a comma-separated list of target URIs or group names.

Or read a target list from an input file '@<file>' or stdin '-'.

Example: --targets localhost,target_group,ssh://nix.com:23,winrm://windows.puppet.com

URI format is [protocol://]host[:port]

SSH is the default protocol; may be ssh, winrm, pcp, local, docker, remote

For Windows targets, specify the winrm:// protocol if it has not be configured

For SSH, port defaults to `22`

For WinRM, port defaults to `5985` or `5986` based on the --[no-]ssl setting

-q, --query QUERY Query PuppetDB to determine the targets
--rerun FILTER Retry on targets from the last run

'all' all targets that were part of the last run.

'failure' targets that failed in the last run.

'success' targets that succeeded in the last run.

--description DESCRIPTION Deprecated. Description to use for the job
-u, --user USER User to authenticate as
-p, --password PASSWORD Password to authenticate with
--password-prompt Prompt for user to input password
--private-key KEY Path to private ssh key to authenticate with
--[no-]host-key-check Check host keys with SSH
--[no-]ssl Use SSL with WinRM
--[no-]ssl-verify Verify remote host SSL certificate with WinRM
--run-as USER User to run as using privilege escalation
--sudo-password PASSWORD Password for privilege escalation
--sudo-password-prompt Prompt for user to input escalation password
--sudo-executable EXEC Specify an executable for running as another user.

This option is experimental.

-c, --concurrency CONCURRENCY Maximum number of simultaneous connections
-i, --inventoryfile PATH Specify where to load inventory from (default: ~/.puppetlabs/bolt/inventory.yaml)
--[no-]save-rerun Whether to update the rerun file after this command.
--[no-]cleanup Whether to clean up temporary files created on targets
--project PATH Path to load the Bolt project from (default: autodiscovered from current dir)
--configfile PATH Deprecated. Specify where to load config from (default:

~/.puppetlabs/bolt/bolt.yaml). Directory containing bolt.yaml will be

used as the project directory.

--boltdir PATH Deprecated. Specify what project to load config from (default:

autodiscovered from current working dir)

-m, --modulepath MODULES List of directories containing modules, separated by ':'

Directories are case-sensitive

--transport TRANSPORT Specify a default transport: ssh, winrm, pcp, local, docker, remote
--connect-timeout TIMEOUT Connection timeout in seconds (defaults vary)
--[no-]tty Request a pseudo TTY on targets that support it
--[no-]native-ssh Whether to shell out to native SSH or use the net-ssh Ruby library.

This option is experimental

--ssh-command EXEC Executable to use instead of the net-ssh Ruby library.

This option is experimental.

--copy-command EXEC Command to copy files to remote hosts if using native SSH.

This option is experimental.

--format FORMAT Output format to use: human or json
--[no-]color Whether to show output in color
-v, --[no-]verbose Display verbose logging
--trace Display error stack traces
-h, --help Display help
--version Display the version
--debug Display debug logging
--log-level LEVEL Set the log level for the console. Available options are

trace, debug, info, warn, error, fatal, any.

--tmpdir DIR The directory to upload and execute temporary files on the target
--env-var ENVIRONMENT_VARIABLES Environment variables to set on the target

secret createkeys

Create new encryption keys.

Usage

bolt secret createkeys [options]
Option Description
-h, --help Display help
--version Display the version
--debug Display debug logging
--log-level LEVEL Set the log level for the console. Available options are

trace, debug, info, warn, error, fatal, any.

--project PATH Path to load the Bolt project from (default: autodiscovered from current dir)
--configfile PATH Deprecated. Specify where to load config from (default:

~/.puppetlabs/bolt/bolt.yaml). Directory containing bolt.yaml will be

used as the project directory.

--boltdir PATH Deprecated. Specify what project to load config from (default:

autodiscovered from current working dir)

-m, --modulepath MODULES List of directories containing modules, separated by ':'

Directories are case-sensitive

--plugin PLUGIN Select the plugin to use
--force Force a destructive action

secret decrypt

Decrypt a value.

Usage

bolt secret decrypt <ciphertext> [options]
Option Description
-h, --help Display help
--version Display the version
--debug Display debug logging
--log-level LEVEL Set the log level for the console. Available options are

trace, debug, info, warn, error, fatal, any.

--project PATH Path to load the Bolt project from (default: autodiscovered from current dir)
--configfile PATH Deprecated. Specify where to load config from (default:

~/.puppetlabs/bolt/bolt.yaml). Directory containing bolt.yaml will be

used as the project directory.

--boltdir PATH Deprecated. Specify what project to load config from (default:

autodiscovered from current working dir)

-m, --modulepath MODULES List of directories containing modules, separated by ':'

Directories are case-sensitive

--plugin PLUGIN Select the plugin to use

secret encrypt

Encrypt a value.

Usage

bolt secret encrypt <plaintext> [options]
Option Description
-h, --help Display help
--version Display the version
--debug Display debug logging
--log-level LEVEL Set the log level for the console. Available options are

trace, debug, info, warn, error, fatal, any.

--project PATH Path to load the Bolt project from (default: autodiscovered from current dir)
--configfile PATH Deprecated. Specify where to load config from (default:

~/.puppetlabs/bolt/bolt.yaml). Directory containing bolt.yaml will be

used as the project directory.

--boltdir PATH Deprecated. Specify what project to load config from (default:

autodiscovered from current working dir)

-m, --modulepath MODULES List of directories containing modules, separated by ':'

Directories are case-sensitive

--plugin PLUGIN Select the plugin to use

task run

Run a task on the specified targets.

Parameters take the form parameter=value.

Usage

bolt task run <task> [parameters] [options]
Option Description
-t, --targets TARGETS Identifies the targets of command.

Enter a comma-separated list of target URIs or group names.

Or read a target list from an input file '@<file>' or stdin '-'.

Example: --targets localhost,target_group,ssh://nix.com:23,winrm://windows.puppet.com

URI format is [protocol://]host[:port]

SSH is the default protocol; may be ssh, winrm, pcp, local, docker, remote

For Windows targets, specify the winrm:// protocol if it has not be configured

For SSH, port defaults to `22`

For WinRM, port defaults to `5985` or `5986` based on the --[no-]ssl setting

-q, --query QUERY Query PuppetDB to determine the targets
--rerun FILTER Retry on targets from the last run

'all' all targets that were part of the last run.

'failure' targets that failed in the last run.

'success' targets that succeeded in the last run.

--description DESCRIPTION Deprecated. Description to use for the job
-u, --user USER User to authenticate as
-p, --password PASSWORD Password to authenticate with
--password-prompt Prompt for user to input password
--private-key KEY Path to private ssh key to authenticate with
--[no-]host-key-check Check host keys with SSH
--[no-]ssl Use SSL with WinRM
--[no-]ssl-verify Verify remote host SSL certificate with WinRM
--run-as USER User to run as using privilege escalation
--sudo-password PASSWORD Password for privilege escalation
--sudo-password-prompt Prompt for user to input escalation password
--sudo-executable EXEC Specify an executable for running as another user.

This option is experimental.

-c, --concurrency CONCURRENCY Maximum number of simultaneous connections
-i, --inventoryfile PATH Specify where to load inventory from (default: ~/.puppetlabs/bolt/inventory.yaml)
--[no-]save-rerun Whether to update the rerun file after this command.
--[no-]cleanup Whether to clean up temporary files created on targets
--project PATH Path to load the Bolt project from (default: autodiscovered from current dir)
--configfile PATH Deprecated. Specify where to load config from (default:

~/.puppetlabs/bolt/bolt.yaml). Directory containing bolt.yaml will be

used as the project directory.

--boltdir PATH Deprecated. Specify what project to load config from (default:

autodiscovered from current working dir)

-m, --modulepath MODULES List of directories containing modules, separated by ':'

Directories are case-sensitive

--transport TRANSPORT Specify a default transport: ssh, winrm, pcp, local, docker, remote
--connect-timeout TIMEOUT Connection timeout in seconds (defaults vary)
--[no-]tty Request a pseudo TTY on targets that support it
--[no-]native-ssh Whether to shell out to native SSH or use the net-ssh Ruby library.

This option is experimental

--ssh-command EXEC Executable to use instead of the net-ssh Ruby library.

This option is experimental.

--copy-command EXEC Command to copy files to remote hosts if using native SSH.

This option is experimental.

--format FORMAT Output format to use: human or json
--[no-]color Whether to show output in color
-v, --[no-]verbose Display verbose logging
--trace Display error stack traces
-h, --help Display help
--version Display the version
--debug Display debug logging
--log-level LEVEL Set the log level for the console. Available options are

trace, debug, info, warn, error, fatal, any.

--params PARAMETERS Parameters to a task or plan as json, a json file '@<file>', or on stdin '-'
--tmpdir DIR The directory to upload and execute temporary files on the target
--noop See what changes Bolt will make without actually executing the changes

task show

Show available tasks and task documentation.

Omitting the name of a task will display a list of tasks available in the Bolt project.

Providing the name of a task will display detailed documentation for the task, including a list of available parameters.

Usage

bolt task show [task] [options]
Option Description
-h, --help Display help
--version Display the version
--debug Display debug logging
--log-level LEVEL Set the log level for the console. Available options are

trace, debug, info, warn, error, fatal, any.

--project PATH Path to load the Bolt project from (default: autodiscovered from current dir)
--configfile PATH Deprecated. Specify where to load config from (default:

~/.puppetlabs/bolt/bolt.yaml). Directory containing bolt.yaml will be

used as the project directory.

--boltdir PATH Deprecated. Specify what project to load config from (default:

autodiscovered from current working dir)

-m, --modulepath MODULES List of directories containing modules, separated by ':'

Directories are case-sensitive

--filter FILTER Filter tasks and plans by a matching substring
--format FORMAT Output format to use: human or json
Puppet sites use proprietary and third-party cookies. By using our sites, you agree to our cookie policy.