Hi all,

is there any way to completely ignore some array element when munging

custom_type { "name":
  groups => ["gr1", "gr2", "gr3"],
}

In case of any array member is not exists on system, I want to remove it
from resource[:groups]


But this code:

newproperty(:groups, :array_matching => :all) do

munge do |group|

  if does_not_exists(group)

    nil

  else

   group

  end

end


iterates on all array items and returns array with nil items. Is there way
to remove items from array in munge.


Thanks.

-- 
Best regards,
Vasil Mikhalenya

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAPc4iSBQ4QSL60%3DnNYRw6GcEbAUft5RfdiVH-Tnqz-PJ9utQmw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to