Adding module dependencies

Edit the module's metadata.json file to add module dependencies. See the following example:

"dependencies": [
{ "name":" stankevich/python",
"version_requirement":">= 1.18.x"
}
]

The name key is the name of the requirement, namely, "pe" or "puppet". The version_requirement key is a semver (http://semver.org) value or range. See the following examples:

  • 1.18.0
  • 1.18.x
  • >= 1.18.x
  • >=1.18.x <2.x.x

These would all be valid values for version_requirement.

Check the metadata.json file for validity afterwards using the new PDK command, as follows:

$ pdk validate metadata

The great thing about adding module dependencies is the fact that, when you run the puppet module download command, Puppet will download all the module dependencies accordingly.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.19.30.232