Take a look at http://docs.puppetlabs.com/guides/custom_functions.html you
could write your own fuctions to give you something like this.
Puppet hasn't really been designed to be low overhead (with more of a focus
on simplicity) and i think the least of it's performance problems come from
the fact that it uses an external fork for exec checks.
On Sunday, June 23, 2013 8:39:57 PM UTC+10, Amos Shapira wrote:
>
> Hi,
>
> A little annoyance about "exec" that bothers me is that there is no way to
> use "unless"/"onlyif" except with external commands, even if a simple Ruby
> function could be used to execute the test.
>
> e.g. "onlyif => 'test -d /data'" will fork and exec "test" to do a simple
> stat(2) which can be done with much less overhead with Ruby's
> "File.directory?('/data')".
>
> How about allowing passing a none-string value to Exec's onlyif/unless
> attributes, and consider that as the result? If it's a string then it will
> be treated as today, otherwise it will be treated as a boolean.
>
> I don't think this will break any backward compatibility since all Exec's
> currently expect strings to execute.
>
> Cheers,
>
> --Amos
>
>
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.