Skip to content
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

(GH-2652) Support Puppet paths in 'bolt script run' #2688

Merged
merged 1 commit into from Mar 5, 2021

Conversation

beechtom
Copy link
Contributor

@beechtom beechtom commented Mar 4, 2021

This adds support for using Puppet paths (<MODULE NAME>/<FILE NAME>)
in bolt script run and Invoke-BoltScript. The default behavior is to
still locate the script file using an absolute/relative path, but Bolt
will now fall back to checking if the path is a Puppet path if that
fails.

!feature

  • Support Puppet paths when running scripts from the CLI
    (#2652)

    You can now use Puppet paths (<MODULE NAME>/<FILE NAME>) to specify
    the path to a script when running bolt script run or
    Invoke-BoltScript.

This adds support for using Puppet paths (`<MODULE NAME>/<FILE NAME>`)
in `bolt script run` and `Invoke-BoltScript`. The default behavior is to
still locate the script file using an absolute/relative path, but Bolt
will now fall back to checking if the path is a Puppet path if that
fails.

!feature

* **Support Puppet paths when running scripts from the CLI**
  ([puppetlabs#2652](puppetlabs#2652))

  You can now use Puppet paths (`<MODULE NAME>/<FILE NAME>`) to specify
  the path to a script when running `bolt script run` or
  `Invoke-BoltScript`.
@beechtom beechtom marked this pull request as ready for review March 4, 2021 20:39
@beechtom beechtom requested a review from a team as a code owner March 4, 2021 20:39
@beechtom beechtom linked an issue Mar 4, 2021 that may be closed by this pull request
Copy link
Contributor

@lucywyman lucywyman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

  • Finds files from the builtin modulepath
  • Finds files from the user-defined modulepath
  • Errors if the script isn't in the module (with a very fancy path even!)
  • Errors if the script is in the module but isn't under files/
  • Errors if the script is unreadable (ie. owned by another user with 600 permissions)

@lucywyman lucywyman merged commit bf4eb0b into puppetlabs:main Mar 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Standard script path reference for bolt script run and run_script
2 participants