Hello,

I have been working on trying to drive an include statement with an array 
parameter.

The idea looks like so (in pseudo code) :


class foo( $whitelist = $::foo::params::whitelist, $blacklist = [],) {

  $include_list = inline_template( "<% @whitelist - @blacklist %>" ) 
  validate_array($include_list)
  include $include_list

}

I picked up that inline template from a message in the group dating back to 
2011.

Basically, class foo has a ton of subclasses who's names populate the 
default value for $whitelist.  Normally all these get applied, but I need 
to allow for deviations for specific cases, thus the blacklist.

The issue seems to be that no matter what I put in whitelist or blacklist, 
include_list is always empty.  What am I missing?  I have also tried 
writing a Custom Function to do the same as the inline template but the 
result was not anymore successful, though the debugging was more difficult.

Thanks for your thoughts on this!

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/6ac9c22b-f5fc-409b-a75e-7d286862220b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to