Question about Deferred functions

19 views
Skip to first unread message

Vincent Lamers

unread,
Jul 6, 2020, 11:39:32 PM7/6/20
to puppet...@googlegroups.com
Hi All,

as I understood a Deferred function is invoked as the first part of enforcing a catalog. 

I have a deferred function which depends on the results of a certain resource. So I have to make sure the resource is applied before the deferred function is executed.
Unfortunately a require function doesn't solve this.

How do I accomplish that?

regards,
Vincent Lamers

Henrik Lindberg

unread,
Jul 7, 2020, 11:06:57 AM7/7/20
to puppet...@googlegroups.com
You cannot do this with Deferred functions. All deferred functions are
evaluated in undefined order before the catalog is applied. Resources
are applied after this.

You can view it as an extension of the compilation of the catalog - only
deferred and taking place on the agent side.

If you cannot solve this with exec resources you may need to implement
your own resource type.

Best,
- henrik

>
> regards,
> Vincent Lamers
>
> --
> 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 puppet-users...@googlegroups.com
> <mailto:puppet-users...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/e6fd7208cae846df4d3e6c7931ec92646be9da8f.camel%40atcomputing.nl
> <https://groups.google.com/d/msgid/puppet-users/e6fd7208cae846df4d3e6c7931ec92646be9da8f.camel%40atcomputing.nl?utm_medium=email&utm_source=footer>.


--

Visit my Blog "Puppet on the Edge"
http://puppet-on-the-edge.blogspot.se/

Reply all
Reply to author
Forward
0 new messages