Skip to main content

setPuppetAutomation

A Workflow Engine function that sets the instance and job template rule set to use for Puppet automation requests. Checks the template name against your Puppet integration for a matching job template name. If found, uses the rule set to generate the request payload. Otherwise, uses the default job template rules.

This function relates directly to configurations from your Puppet integration.

setPuppetAutomation typically precedes a sendToPuppet action in your workflow, which uses the payload this function generates.

This function is available as a feature of the Add-ons v1.3 download and later.

This function is only available for automation alert and automation Situation workflows.

Back to Workflow Engine Functions Reference.

Arguments

Workflow Engine function setPuppetAutomation takes the following arguments:

Name

Required

Type

Description

instance

Yes

String

Name of your Puppet integration instance.

templateName

Yes

String

Name of the template. Must match the Workflow Job Template Name in your Puppet integration.

Example

The following example demonstrates typical use of Workflow Engine function setPuppetAutomation. It assumes you have set up and configured the following:

  • A Puppet integration with the name "Puppet1".

  • Within your Puppet integration, a Workflow Job Template Name instance called "my-plan".

Set the following:

  • instance: Puppet1

  • templateName: my-plan

  • Forwarding Behavior: Stop this workflow. This prevents further processing if the function fails to locate your configuration and returns false.

The UI translates your settings to the following JSON:

{"instance":"Puppet1","templateName":"my-plan"}