This section introduces you to adding compatibility data for the module designed for your version of Puppet or Puppet Enterprise and the operating system you want to work with. To begin with, Edit the module's metadata.json
file to add compatibility data.
Express the operating systems your module supports in the module's metadata.json
, as shown in the following example:
"operatingsystem_support": [ { "operatingsystem": "RedHat", }, { "operatingsystem": "Ubuntu", }, ]
The Facter facts operatingsystem
and operatingsystemrelease
are expected. Here's a more complete example:
"operatingsystem_support": [ { "operatingsystem":"RedHat", "operatingsystemrelease":[ "5.0", "6.0" ] }, { "operatingsystem": "Ubuntu", "operatingsystemrelease": [ "12.04", "10.04" ] } ]
Check the metadata.json
file for validity afterwards using the new pdk
command:
$ pdk validate metadata
The requirements
key in the metadata.json
file is a list of external requirements for the module in the following format:
"requirements": [ {“name”: “pe”, “version_requirement”: “5.x”}]
name
is the name of the requirement, for example "pe"
or "puppet"
. version_requirement
can be a semver (http://semver.org) version range, similar to dependencies.
Again, you can check the metadata.json
file for validity afterwards using the new PDK command, as follows:
$ pdk validate metadata