Use the Puppet language, or the Ruby API to create custom functions.
- Custom functions
Puppet includes many built-in functions, and more are available in modules on the Forge. You can also write your own custom functions. - Custom Puppet functions
You can write simple custom functions in the Puppet language, to transform data and construct values. A function can optionally take one or more parameters as arguments. A function returns a calculated value from its final expression. - Writing custom functions in Ruby
You can write powerful and flexible functions using Ruby. - Secrets store integrations and agent-side data retrieval
Puppet agents can fetch or calculate data for themselves at catalog application time. One use case for this is to securely retrieve sensitive information like passwords from a secrets store. - Write a Puppet function to store secrets
Use theDeferred
type to create a function that you add to a module to redact sensitive information.