Creating and distributing the type

The best way to create and distribute a new custom type is to place it into a module, in the puppet/type subdirectory of the lib directory, and it will then be distributed to the agent machine via pluginsync, as we already saw with custom facts in the previous section.

The filename should match the name of the type under development, as shown in the following code:

 <modulepath>/lib/puppet/type/mynewtype.rb

Puppet::Type.newtype(:mynewtype) do
...
end
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.193.232