Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Puppet 5

You're reading from   Mastering Puppet 5 Optimize enterprise-grade environment performance with Puppet

Arrow left icon
Product type Paperback
Published in Sep 2018
Publisher Packt
ISBN-13 9781788831864
Length 292 pages
Edition 1st Edition
Tools
Arrow right icon
Authors (2):
Arrow left icon
Jason Southgate Jason Southgate
Author Profile Icon Jason Southgate
Jason Southgate
Ryan Russell-Yates Ryan Russell-Yates
Author Profile Icon Ryan Russell-Yates
Ryan Russell-Yates
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Authoring Modules FREE CHAPTER 2. Roles and Profiles 3. Extending Puppet 4. Hiera 5 5. Managing Code 6. Workflow 7. Continuous Integration 8. Extending Puppet with Tasks and Discovery 9. Exported Resources 10. Application Orchestration 11. Scaling Puppet 12. Troubleshooting and Profiling 13. Other Books You May Enjoy

Adding compatibility data for your modules

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.

Operating systems support

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

Puppet and PE version support

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
You have been reading a chapter from
Mastering Puppet 5
Published in: Sep 2018
Publisher: Packt
ISBN-13: 9781788831864
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime