Designing for use of the include keyword

The single interface of your profiles should be their adoption in the corresponding roles part of the pattern using the Puppet include keyword. Bear this in mind when writing your profiles. We would simply write the following in any role that requires PHP to be installed on that node:

... include profile::programming::php ...

With regard to the Puppet include keyword:

  • Multiple declarations are OK
  • It relies on external data for parameters
Syntax: Accepts a single class name (for example, include apache), or class reference (for example, include Class['apache'])

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.