-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support powershell parameters when passing a script. #2651
Labels
Feature
New features and improvements.
Comments
beechtom
added a commit
to beechtom/bolt
that referenced
this issue
Mar 2, 2021
This adds a `pwsh_params` option to the `run_script` plan function. The option accepts a hash of named parameters to pass to a PowerShell script, where each key is the name of the parameter. If the `run_script` function is called with both the `arguments` and `pwsh_params` options, Bolt will error and provide a helpful message that both cannot be specified. This also adds a `pwsh_params` key to the YAML plan script step. !feature * **Add `pwsh_params` option to `run_script` plan function** ([puppetlabs#2651](puppetlabs#2651)) The `run_script` plan function now accepts a `pwsh_params` option which can be used to pass named parameters to a PowerShell script.
beechtom
added a commit
to beechtom/bolt
that referenced
this issue
Mar 2, 2021
This adds a `pwsh_params` option to the `run_script` plan function. The option accepts a hash of named parameters to pass to a PowerShell script, where each key is the name of the parameter. If the `run_script` function is called with both the `arguments` and `pwsh_params` options, Bolt will error and provide a helpful message that both cannot be specified. This also adds a `pwsh_params` key to the YAML plan script step. !feature * **Add `pwsh_params` option to `run_script` plan function** ([puppetlabs#2651](puppetlabs#2651)) The `run_script` plan function now accepts a `pwsh_params` option which can be used to pass named parameters to a PowerShell script.
beechtom
added a commit
to beechtom/bolt
that referenced
this issue
Mar 2, 2021
This adds a `pwsh_params` option to the `run_script` plan function. The option accepts a hash of named parameters to pass to a PowerShell script, where each key is the name of the parameter. If the `run_script` function is called with both the `arguments` and `pwsh_params` options, Bolt will error and provide a helpful message that both cannot be specified. This also adds a `pwsh_params` key to the YAML plan script step. !feature * **Add `pwsh_params` option to `run_script` plan function** ([puppetlabs#2651](puppetlabs#2651)) The `run_script` plan function now accepts a `pwsh_params` option which can be used to pass named parameters to a PowerShell script.
beechtom
added a commit
to beechtom/bolt
that referenced
this issue
Mar 2, 2021
This adds a `pwsh_params` option to the `run_script` plan function. The option accepts a hash of named parameters to pass to a PowerShell script, where each key is the name of the parameter. If the `run_script` function is called with both the `arguments` and `pwsh_params` options, Bolt will error and provide a helpful message that both cannot be specified. This also adds a `pwsh_params` key to the YAML plan script step. !feature * **Add `pwsh_params` option to `run_script` plan function** ([puppetlabs#2651](puppetlabs#2651)) The `run_script` plan function now accepts a `pwsh_params` option which can be used to pass named parameters to a PowerShell script.
beechtom
added a commit
to beechtom/bolt
that referenced
this issue
Mar 2, 2021
This adds a `pwsh_params` option to the `run_script` plan function. The option accepts a hash of named parameters to pass to a PowerShell script, where each key is the name of the parameter. If the `run_script` function is called with both the `arguments` and `pwsh_params` options, Bolt will error and provide a helpful message that both cannot be specified. This also adds a `pwsh_params` key to the YAML plan script step. !feature * **Add `pwsh_params` option to `run_script` plan function** ([puppetlabs#2651](puppetlabs#2651)) The `run_script` plan function now accepts a `pwsh_params` option which can be used to pass named parameters to a PowerShell script.
beechtom
added a commit
to beechtom/bolt
that referenced
this issue
Mar 2, 2021
This adds a `pwsh_params` option to the `run_script` plan function. The option accepts a hash of named parameters to pass to a PowerShell script, where each key is the name of the parameter. If the `run_script` function is called with both the `arguments` and `pwsh_params` options, Bolt will error and provide a helpful message that both cannot be specified. This also adds a `pwsh_params` key to the YAML plan script step. !feature * **Add `pwsh_params` option to `run_script` plan function** ([puppetlabs#2651](puppetlabs#2651)) The `run_script` plan function now accepts a `pwsh_params` option which can be used to pass named parameters to a PowerShell script.
beechtom
added a commit
to beechtom/bolt
that referenced
this issue
Mar 2, 2021
This adds a `pwsh_params` option to the `run_script` plan function. The option accepts a hash of named parameters to pass to a PowerShell script, where each key is the name of the parameter. If the `run_script` function is called with both the `arguments` and `pwsh_params` options, Bolt will error and provide a helpful message that both cannot be specified. This also adds a `pwsh_params` key to the YAML plan script step. !feature * **Add `pwsh_params` option to `run_script` plan function** ([puppetlabs#2651](puppetlabs#2651)) The `run_script` plan function now accepts a `pwsh_params` option which can be used to pass named parameters to a PowerShell script.
beechtom
added a commit
to beechtom/bolt
that referenced
this issue
Mar 8, 2021
This adds a `pwsh_params` option to the `run_script` plan function. The option accepts a hash of named parameters to pass to a PowerShell script, where each key is the name of the parameter. If the `run_script` function is called with both the `arguments` and `pwsh_params` options, Bolt will error and provide a helpful message that both cannot be specified. This also adds a `pwsh_params` key to the YAML plan script step. !feature * **Add `pwsh_params` option to `run_script` plan function** ([puppetlabs#2651](puppetlabs#2651)) The `run_script` plan function now accepts a `pwsh_params` option which can be used to pass named parameters to a PowerShell script.
beechtom
added a commit
to beechtom/bolt
that referenced
this issue
Mar 8, 2021
This adds a `pwsh_params` option to the `run_script` plan function. The option accepts a hash of named parameters to pass to a PowerShell script, where each key is the name of the parameter. If the `run_script` function is called with both the `arguments` and `pwsh_params` options, Bolt will error and provide a helpful message that both cannot be specified. This also adds a `pwsh_params` key to the YAML plan script step. !feature * **Add `pwsh_params` option to `run_script` plan function** ([puppetlabs#2651](puppetlabs#2651)) The `run_script` plan function now accepts a `pwsh_params` option which can be used to pass named parameters to a PowerShell script.
beechtom
added a commit
to beechtom/bolt
that referenced
this issue
Mar 8, 2021
This adds a `pwsh_params` option to the `run_script` plan function. The option accepts a hash of named parameters to pass to a PowerShell script, where each key is the name of the parameter. If the `run_script` function is called with both the `arguments` and `pwsh_params` options, Bolt will error and provide a helpful message that both cannot be specified. This also adds a `pwsh_params` key to the YAML plan script step. !feature * **Add `pwsh_params` option to `run_script` plan function** ([puppetlabs#2651](puppetlabs#2651)) The `run_script` plan function now accepts a `pwsh_params` option which can be used to pass named parameters to a PowerShell script.
beechtom
added a commit
to beechtom/bolt
that referenced
this issue
Mar 8, 2021
This adds a `pwsh_params` option to the `run_script` plan function. The option accepts a hash of named parameters to pass to a PowerShell script, where each key is the name of the parameter. If the `run_script` function is called with both the `arguments` and `pwsh_params` options, Bolt will error and provide a helpful message that both cannot be specified. This also adds a `pwsh_params` key to the YAML plan script step. !feature * **Add `pwsh_params` option to `run_script` plan function** ([puppetlabs#2651](puppetlabs#2651)) The `run_script` plan function now accepts a `pwsh_params` option which can be used to pass named parameters to a PowerShell script.
beechtom
added a commit
to beechtom/bolt
that referenced
this issue
Mar 8, 2021
This adds a `pwsh_params` option to the `run_script` plan function. The option accepts a hash of named parameters to pass to a PowerShell script, where each key is the name of the parameter. If the `run_script` function is called with both the `arguments` and `pwsh_params` options, Bolt will error and provide a helpful message that both cannot be specified. This also adds a `pwsh_params` key to the YAML plan script step. !feature * **Add `pwsh_params` option to `run_script` plan function** ([puppetlabs#2651](puppetlabs#2651)) The `run_script` plan function now accepts a `pwsh_params` option which can be used to pass named parameters to a PowerShell script.
beechtom
added a commit
to beechtom/bolt
that referenced
this issue
Mar 8, 2021
This adds a `pwsh_params` option to the `run_script` plan function. The option accepts a hash of named parameters to pass to a PowerShell script, where each key is the name of the parameter. If the `run_script` function is called with both the `arguments` and `pwsh_params` options, Bolt will error and provide a helpful message that both cannot be specified. This also adds a `pwsh_params` key to the YAML plan script step. !feature * **Add `pwsh_params` option to `run_script` plan function** ([puppetlabs#2651](puppetlabs#2651)) The `run_script` plan function now accepts a `pwsh_params` option which can be used to pass named parameters to a PowerShell script.
beechtom
added a commit
to beechtom/bolt
that referenced
this issue
Mar 8, 2021
This adds a `pwsh_params` option to the `run_script` plan function. The option accepts a hash of named parameters to pass to a PowerShell script, where each key is the name of the parameter. If the `run_script` function is called with both the `arguments` and `pwsh_params` options, Bolt will error and provide a helpful message that both cannot be specified. This also adds a `pwsh_params` key to the YAML plan script step. !feature * **Add `pwsh_params` option to `run_script` plan function** ([puppetlabs#2651](puppetlabs#2651)) The `run_script` plan function now accepts a `pwsh_params` option which can be used to pass named parameters to a PowerShell script.
lucywyman
added a commit
that referenced
this issue
Mar 9, 2021
(GH-2651) Add pwsh_params option to run_script function
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use Case
Powershell has a standard method of passing parameters to a script. Bolt should expose this to the run_script function and script step.
Describe the Solution You Would Like
Bolt's run_script should accept a hash of
pwsh_params
and pass those parameters to the script.run_script(my_script.ps, $targets, pwsh_params => { 'this' => 1, 'that' => argument} )
Bolt should support accepting arguments along with params.
Questions
Not at this point string only for now.
bolt script run
cli?This is less important because you don't have filter out parameters.
Not at this point but we should look for how we can leverage this after it's merged in.
The text was updated successfully, but these errors were encountered: