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 ...

Get Mastering Puppet 5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.