On Sep 28, 5:38 pm, Sans <r.santanu....@gmail.com> wrote: > Thanks Peter! > Custom fact is a great idea but the downside is one needs to create a > custom-fact each for every check you wanna perform. Isn't there > anything a bit more dynamic, like checking the location on fly ( bash > equivalent: if [ -d "/var/torque/mom_priv" ]; ) ?? Cheers!!
The idea in the first place runs somewhat against the grain for Puppet: in general, you should prefer Puppet to tell, rather than to ask. Thus, the question is why Puppet doesn't already know whether / var/torque/mom_priv should exist. By design, Puppet DSL has no direct mechanism for specifying client-side logic. That leaves you with three alternatives for configuring clients based on unmanaged state details: 1) Use custom facts to report client state details to the master, and perform the logic there. 2) Use an Exec to run a script, either as literal code or from a file. 3) Write a custom type and provider in Ruby that does what you want. Where possible, I recommend avoiding all of those and instead managing the state in question. John -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.