Hi guys, Is it currently possible to do something along the lines of: class accounts { require => Fact["blah"] ... } Reason I ask is that I have a custom fact for the directory to use as the base home directory (it varies based on OS, etc.) for user accounts. The problem I have is that when I jumpstart a new server and put Puppet on it, the first run doesn''t know about the home directory fact (it gets grabbed in from a different class - "customfacts") and as a result all the home directories get created in the root directory, not in /home (or /export/home) Now I can put in a require => Fact["blah"] for every user, but that seems somewhat excessive. It means that for every fact that I include, I need to require that fact for every object I use it in... At least at a class level I can tell it what I need for that class... Or does anyone have any other ideas on how I can tackle this? thanks, Greg --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
RijilV
2009-May-12 03:31 UTC
[Puppet Users] Re: Making an entire class depend on something...
2009/5/11 Greg <greg.boug@gmail.com>:> > Hi guys, > > Is it currently possible to do something along the lines of: > > class accounts { > require => Fact["blah"] > ... > } > > Reason I ask is that I have a custom fact for the directory to use as > the base home directory > (it varies based on OS, etc.) for user accounts. The problem I have is > that when I jumpstart > a new server and put Puppet on it, the first run doesn''t know about > the home directory fact > (it gets grabbed in from a different class - "customfacts") and as a > result all the home directories > get created in the root directory, not in /home (or /export/home) > > Now I can put in a require => Fact["blah"] for every user, but that > seems somewhat excessive. > It means that for every fact that I include, I need to require that > fact for every object I use it in... > At least at a class level I can tell it what I need for that class... > > Or does anyone have any other ideas on how I can tackle this? > > thanks, > > GregTo the best of my knowledge this is still something that cannot be done. It did come up exactly one year ago in the somewhat infamous thread "Philosophical Differences"[1]. You might search the bugs/feature requests on the Reductive Labs site and if you don''t find it you should request it, as I''m pretty sure this would be a useful thing to have. Cheers, .r'' [1]: http://groups.google.com/group/puppet-users/browse_thread/thread/476957cb16b30986/cc0b79b6a1047a8c?hl=en&q=class+dependency&lnk=ol& --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Trevor Vaughan
2009-May-12 14:21 UTC
[Puppet Users] Re: Making an entire class depend on something...
I''m not sure if this would entirely work in your case, but I''ve had luck with um...excessive...includes. If you need ''customfacts'' to be included in that class, just include it at the top of your ''accounts'' class. In theory, this works properly but I haven''t tested whether or not it slows down evaluation or execution of the manifests. Trevor On Mon, May 11, 2009 at 20:12, Greg <greg.boug@gmail.com> wrote:> > Hi guys, > > Is it currently possible to do something along the lines of: > > class accounts { > require => Fact["blah"] > ... > } > > Reason I ask is that I have a custom fact for the directory to use as > the base home directory > (it varies based on OS, etc.) for user accounts. The problem I have is > that when I jumpstart > a new server and put Puppet on it, the first run doesn''t know about > the home directory fact > (it gets grabbed in from a different class - "customfacts") and as a > result all the home directories > get created in the root directory, not in /home (or /export/home) > > Now I can put in a require => Fact["blah"] for every user, but that > seems somewhat excessive. > It means that for every fact that I include, I need to require that > fact for every object I use it in... > At least at a class level I can tell it what I need for that class... > > Or does anyone have any other ideas on how I can tackle this? > > thanks, > > Greg > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---