Den onsdag den 10. juli 2013 12.32.07 UTC+2 skrev Salty Old Cowdawg: > > Is there a global variable (or variables) that get set when a group gets > defined in dashboard? What I'm trying to do is in a template have a > conditional such that if a host is in one group do "this" and if not in > that group do "that". > > Well - I use groups in a similar way. I use NIS netgroups (managed by our OpenLDAP cluster), and I then simply wrote a small ENC script, which sets a variable called $netgroups - which is simply a list of netgroups the relevant host is a member of. (ENC scripts are given the hostname.fqdn as a parameter - and can then return yaml with classes or variables to be defined).
I then use IN in manifests and netgroups.include? in my templates. -- 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 post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
