Thank you Brian. Would you mind sharing the code for your custom fact that reads in /var/lib/puppet/classes.txt and presents it as a csv fact value. This would really save me some time as I am not a ruby developer.
From: [email protected] [mailto:[email protected]] On Behalf Of Brian Gallew Sent: Thursday, January 27, 2011 9:08 PM To: [email protected] Subject: Re: [Puppet Users] RE: each clients classes.txt on the server Interestingly enough, I wrote a custom fact to do that. In my case, I have and sshd_config.erb where I want to set the AllowGroups stanza based on all the classes applied to a node. With 2.6.1 I could achieve that effect simply by moving adding a class to the "post" stage (which is run after main) and have that class contain the relevant file{}. When I updated to 2.6.3 it started parsing the template the moment it encountered the resource, rather than waiting for the relevant stage to be reached. Now I just pass back a comma-separated list of all classes for each host and my erb knows how to handle that. A word or warning: as shipped, the fact_value field is VARCHAR($SMALL_VALUE) characters long. I had to change it to be a TEXT field because otherwise it truncated my data. On Thu, Jan 27, 2011 at 6:38 PM, Sukh Khehra <[email protected]<mailto:[email protected]>> wrote: Forgot to mention that we're running 2.6.4 on the server and in the process of migrating all clients from 0.25.5 to 2.6.4. From: [email protected]<mailto:[email protected]> [mailto:[email protected]<mailto:[email protected]>] On Behalf Of Sukh Khehra Sent: Thursday, January 27, 2011 6:33 PM To: [email protected]<mailto:[email protected]> Subject: [Puppet Users] each clients classes.txt on the server We have a lot of includes in our code so it takes some digging around to find the resultant set of classes that apply to a puppet clients. I was thinking of somehow copying classes.txt file from the client to the server for easier analysis. Anyone have any art on how to go about doing that? I'd appreciate any ideas. Regards, Sukh Khehra Sys Admin -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to [email protected]<mailto:[email protected]>. To unsubscribe from this group, send email to [email protected]<mailto:puppet-users%[email protected]>. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to [email protected]<mailto:[email protected]>. To unsubscribe from this group, send email to [email protected]<mailto:puppet-users%[email protected]>. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
