guymatz
2011-Jun-03 17:27 UTC
[Puppet Users] require? before? I need to have a dependency in place . . .
Hi, I need to have a network interface set up with puppet before I can use the interface (as a facter fact) in a subsequent class which uses the IP of the interface in a template . . . So I really need the interface class to execute on the client, the client to resend its facts, then for puppet to continue on. I''ve tried using "require Class[''interface'']" in the webserver class and i''ve tried using "before Class[''webserver]" in the interface class . . . Anyone have any thoughts/suggestions? Thanks a lot, Guy P.S. - does anyone -- 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.
Michael Knox
2011-Jun-03 21:41 UTC
Re: [Puppet Users] require? before? I need to have a dependency in place . . .
Guy, To requery the facts during would, most likely, invalidate your catalogue for that run. I''ve handled this by doing the work over 2 puppet runs. I have a custom fact that requires an X display (thanks to an install app that requires X display, even when using command line options and silent mode). If the custom fact returns it''s default value (ie. the install app can''t/hasn''t run), I don''t do anything with that app in the current puppet run. The particular class then just installs the ruby gem headless so the fact can use it on the next execution. Cheers Mike -- 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.