puppetlabs / bolt-vanagon

Apache License 2.0
2 stars 31 forks source link

(maint) Add powershell functions for bolt #98

Closed mcdonaldseanp closed 5 years ago

mcdonaldseanp commented 5 years ago

This commit adds a new file to the powershell module installed with bolt. The new file includes native powershell functions for using bolt.

Functions include:

'Invoke-BoltPlan',
    'Invoke-BoltTask',
    'Invoke-BoltCommand',
    'Invoke-BoltScript',
    'Invoke-PuppetManifestFromBolt',
    'Send-BoltFile',
    'Get-BoltPlan',
    'Get-BoltTask',
    'Get-BoltModule',
    'Install-BoltModule'

Using powershell functions allow for better parameter parsing (for example the powershell versions of plan run and task run can take a powershell hash instead of a json string for the -Parameters param) and more structured output for use in powershell scripting

mcdonaldseanp commented 5 years ago

@glennsarti I've updated the PR per your comments.

I'm sure there's some code style that could be better, so please LMK if there are ways I can make the code look a little better.

mcdonaldseanp commented 5 years ago

I am closing this PR in favor of https://github.com/puppetlabs/posh-bolt/pull/1

@RandomNoun7 and I discussed our approach here and decided a better direction with this would be a standalone powershell module installable from psgallery