Using arrays to assign a list of values to an attribute

When the expected value of an attribute is an array, the array_matching option should be included in the call to newproperty with a value of all. All values of the array are then used for that attribute, as shown in the following code:

Puppet::Type.newtype(:mynewtype) do   ...   newproperty(:myarray, :array_matching => :all) do   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.