Deferring a function
Deferring a function allows you to run code on the agent during a Puppet run.
Tip: Check out our tutorial on Updating Puppet
modules for deferred functions. In addition to providing general information
about deferred functions, this tutorial explains how to handle cases where a downstream
user passes in a deferred function.
-
Deferred functions overview
Defer a function to retrieve a value on the agent. -
Using a template with Deferred values
Templates are rendered on the primary server during catalog compilation. However, this does not work with deferred functions because their values aren't known at compile time. Instead, you need to defer the template rendering. -
Write a deferred function to store secrets
Use theDeferred
type to create a function that you add to a module to redact sensitive information. -
Integrations with secret stores
The Forge already hosts some community modules that provide integrations with secret stores.