Creating and distributing the provider

The best way to create and distribute a new provider for your type is to place it into the same module, in the puppet/provider/<typename> subdirectory of the lib directory, and it will then be distributed to the agent machine via pluginsync. Note that the filename should match the name of the provider, as shown in the following code:

# <modulepath>/lib/puppet/provider/mynewtype/myprovider.rb  Puppet::Type.type(:mynewtype).provide(:myprovider) do   ... end

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.