A new version of Bolt has arrived! For instructions on how to upgrade to the newest version of Bolt or to download Bolt for the first time, see Installing Bolt.
In this release
- Bolt now automatically imports PowerShell modules that are included in a task's files list. PowerShell tasks no longer need to add separate Import-Module statements to include these extra files. For more information, see Writing tasks.
- Bolt now ships with the powershell_task_helper module, which includes several helper functions for writing tasks in PowerShell. Learn more about using these helper functions in your tasks by checking out the documentation on the Forge.
- The BoltSpec library now includes a config_data method that makes it easy to set Bolt configuration in tests for your plans. You can learn more about BoltSpec and overriding Bolt's configuration in tests by reading the documentation.
- Bolt now supports using Puppet file syntax (puppet:///modules/<MODULE>/<
FILE>) in apply blocks for files in a Bolt project. Previously, referring to these files using Puppet file syntax would result in an error.
- The Result data type's to_data function now correctly serializes Sensitive task output.
- Errors raised from running scripts in PowerShell on targets with an execution policy of Restricted or AllSigned now include clearer messages.
- Bolt's inventory is now correctly exposed to the BoltSpec library. Previously, referencing targets in Bolt's inventory with BoltSpec would result in an 'Undefined method' error.
We've officially added documentation for Bolt's built-in testing library: BoltSpec! This long-hidden (and incredibly useful) feature lets you easily write unit tests for your plans. Check out the Boltspec documentation here.