A helper library for Puppet Tasks written in PowerShell.
- Description
- Setup - The basics of getting started with powershell_task_helper
- Usage - Configuration options and additional functionality
- Development - Guide for contributing to the module
A PowerShell helper library for use by Puppet Tasks. It provides a function that handles error generation, simplifies JSON input and output, and makes testing your task easier. It requires Bolt >= 2.4.
To use this library, include this module in a Puppetfile
:
mod 'puppetlabs-powershell_task_helper'
Add the helper file to your task metadata:
{
"files": ["powershell_task_helper/files/BoltPwshHelper/"],
"input_method": "powershell"
}
Bolt automatically adds your task directory to the $env:PSModulePath
, so PowerShell module auto loading will work without having to write out the Import-Module
statement. If your target is using PowerShell 3.0, you will have to add an import statement.
For a complete example of using the helper file in a task, see the examples.
Puppet modules on the Puppet Forge are open projects, and community contributions are essential for keeping them great. We can’t access the huge number of platforms and myriad of hardware, software, and deployment configurations that Puppet is intended to serve.
We want to keep it as easy as possible to contribute changes so that our modules work in your environment. There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things.
For more information, see the CONTRIBUTING.md documentation in this module.