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". -- Peter L. Berghold Salty.Cowdawg@gmail.com http://blog.berghold.net -- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
On 10.07.2013 12:32, Peter Berghold wrote:> 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".Usually that is handled by adding a class or variable to the group and checking on that. Regards, David -- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
On Fri, Jul 12, 2013 at 2:22 AM, David Schmitt <david@dasz.at> wrote:> >> > Usually that is handled by adding a class or variable to the group and > checking on that. > > I actually tried that and ran into an issue. Here''s the setup:global ---> all hosts belong to this | +-------- email::master defines stuff specific to an email gateway host In global I defined "mailertype" as "nullhost" for all but the gateway hosts which "mailertype" gets set to "gateway." This causes main.cf.erb to get processed one way for nullhosts and in a much more complicated way for gateways. When I tried this and set my gateway hosts to be a member of email::master I get an error in dashboard complaining about conflicted variable definitions. What''s weird is if I set the variable on the node''s properties that error does not pop up. I suppose I could just override the variable on each of the node property sheets, but that''s not what I wanted to do... -- Peter L. Berghold Salty.Cowdawg@gmail.com http://blog.berghold.net -- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
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 ourOpenLDAP 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 puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.