Checking the input value against a newvalues array

We can also validate the provided value of the property with an array of values using the newvalues method, as shown in the following code:

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