This property is an array, whose order does not matter. It's really a set, but Puppet doesn't have sets AFAICT. So I'm trying to use munge
to sort the values:
newproperty(:things, :array_matching => :all) do
munge do |value|
value.sort
end
end
This fails, because the munge
is applied to each of the values in the array instead of the whole thing. Is there any way to make this work?
I had a similar problem, and resolved it like this:
If I were writing a new module, I'd use the Resources API, which has a canonicalize hook for this very purpose.