Setting property and parameter defaults

Let's say we wanted to add an additional override parameter, which we wanted to configure with a default value of false. Here's the Ruby code to express that:

Puppet::Type.newtype(:mynewtype) do   ...   newparam(:override) do     defaultto :false   end   ... 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.