On Tuesday, February 25, 2014 10:50:51 AM UTC-6, bazil wrote:
>
> Unfortunately, the message could be computed only in function. Do I
> understand correctly that it is impossible to push Notify in catalog from
> function during compilation.
>
>
No, you do not:
notify { 'a-message-from-our-sponsors':
message => my_function($the_data)
}
The potential issue is not about the means of computing the message, it is
about where the computation is performed, and a bit about when. In
particular, if the point of using a function is for it to use data or
software available only on the target node, or to modify the target node
directly, then the fact that Puppet custom functions are evaluated on the
master will render your plan inoperable.
Similarly, if you need the computation to be performed only after one or
more resources have been applied to the target node, then a Puppet custom
function cannot help you.
John
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/917fb6e8-300d-498a-ba23-1fa7022b6850%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.