puppetlabs / bolt

Bolt is an open source orchestration tool that automates the manual work it takes to maintain your infrastructure on an as-needed basis or as part of a greater orchestration workflow. It can be installed on your local workstation and connects directly to remote nodes with SSH or WinRM, so you are not required to install any agent software.
https://puppet.com/docs/bolt/latest/bolt.html
Apache License 2.0
499 stars 225 forks source link

Can bolt resolve non-forge dependencies in the ``metadata.json``? #3276

Open gavindidrichsen opened 7 months ago

gavindidrichsen commented 7 months ago

Use Case

I would like Bolt to bring dependent non-Forge modules w/o specifying them directly in the Bolt project.

Describe the Solution You Would Like

For example, the puppetlabs-chocolatey_server metadata.json, contains the following forge dependencies:

  "dependencies": [
    {
      "name": "puppetlabs/acl",
      "version_requirement": ">= 1.0.1 < 3.0.0"
    },
    {
      "name": "puppetlabs/powershell",
      "version_requirement": ">= 1.0.4 < 3.0.0"
    },
    {
      "name": "puppetlabs/iis",
      "version_requirement": ">= 4.0.0 < 5.0.0"
    }

I'd like to be able to add non-forge modules to the dependency list above, if possible. This could be, for example, a git@gitub.com or an https://github.com/org/myrepo.git.

Describe Alternatives You've Considered

N/A

Additional Context

This voxpupuli discussion goes into more detail about the actual ask:

How can I bring that dependency to my main project without specifying it explicitly in the bolt-project.yaml? Ideally, I'd like to specify the my_basemodule as a dependency in the my_module1's metadata.json file. Then I'd expect that bolt module install --force will bring it to my project. Is it possible?

In other words,

I would like Bolt to bring dependent non-Forge modules w/o specifying them directly in the Bolt project.

donoghuc commented 7 months ago

This is not currently possible in bolt's dependency resolution for modules it is noted in the docs: https://www.puppet.com/docs/bolt/latest/bolt_installing_modules.html#add-a-forge-module-and-its-dependencies-to-an-existing-project

As mentioned these dependencies (non forge hosted) will need to be listed in the projects module deps.