Types and providers

Puppet already has a very rich lexicon of built-in resource types (see https://puppet.com/docs/puppet/5.3/type.html), and these have also been extended with additional modules. Windows-specific resource types would be a very good example of where Puppet has had its resource types successfully extended (see https://puppet.com/docs/puppet/5.3/resources_windows_optional.html).

The following are some indications that you may want to consider writing a type and provider as an alternative to regular modules and manifests in Puppet DSL:

  • You have several exec statements in your Puppet DSL with convoluted onlyif and unless conditional properties
  • Puppet doesn't handle situation very well where:
    • Your Puppet DSL is not a powerful-enough ...

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.