awx.awx.tower_workflow_job_template_node – create, update, or destroy Ansible Tower workflow job template nodes.

Note

This plugin is part of the awx.awx collection (version 14.1.0).

To install it use: ansible-galaxy collection install awx.awx.

To use it in a playbook, specify: awx.awx.tower_workflow_job_template_node.

Synopsis

  • Create, update, or destroy Ansible Tower workflow job template nodes.

  • Use this to build a graph for a workflow, which dictates what the workflow runs.

  • Replaces the deprecated tower_workflow_template module schema command.

  • You can create nodes first, and link them afterwards, and not worry about ordering. For failsafe referencing of a node, specify identifier, WFJT, and organization. With those specified, you can choose to modify or not modify any other parameter.

Parameters

Parameter Choices/Defaults Comments
all_parents_must_converge
boolean
    Choices:
  • no
  • yes
If enabled then the node will only run if all of the parent nodes have met the criteria to reach this node
always_nodes
list / elements=string
Nodes that will run after this node completes.
List of node identifiers.
credentials
list / elements=string
Credentials to be applied to job as launch-time prompts.
List of credential names.
Uniqueness is not handled rigorously.
diff_mode
boolean
    Choices:
  • no
  • yes
Run diff mode, applied as a prompt, if job template prompts for diff mode
extra_data
dictionary
Default:
{}
Variables to apply at launch time.
Will only be accepted if job template prompts for vars or has a survey asking for those vars.
failure_nodes
list / elements=string
Nodes that will run after this node on failure.
List of node identifiers.
identifier
string / required
An identifier for this node that is unique within its workflow.
It is copied to workflow job nodes corresponding to this node.
inventory
string
Inventory applied as a prompt, if job template prompts for inventory
job_tags
string
Job tags applied as a prompt, if job template prompts for job tags
job_type
string
    Choices:
  • run
  • check
Job type applied as a prompt, if job template prompts for job type
limit
string
Limit to act on, applied as a prompt, if job template prompts for limit
organization
string
The organization of the workflow job template the node exists in.
Used for looking up the workflow, not a direct model field.
scm_branch
string
SCM branch applied as a prompt, if job template prompts for SCM branch
skip_tags
string
Tags to skip, applied as a prompt, if job tempalte prompts for job tags
state
string
    Choices:
  • present ←
  • absent
Desired state of the resource.
success_nodes
list / elements=string
Nodes that will run after this node on success.
List of node identifiers.
tower_config_file
path
Path to the Tower or AWX config file.
If provided, the other locations for config files will not be considered.
tower_host
string
URL to your Tower or AWX instance.
If value not set, will try environment variable TOWER_HOST and then config files
If value not specified by any means, the value of 127.0.0.1 will be used
tower_oauthtoken
raw
added in 3.7 of awx.awx
The Tower OAuth token to use.
This value can be in one of two formats.
A string which is the token itself. (i.e. bqV5txm97wqJqtkxlMkhQz0pKhRMMX)
A dictionary structure as returned by the tower_token module.
If value not set, will try environment variable TOWER_OAUTH_TOKEN and then config files
tower_password
string
Password for your Tower or AWX instance.
If value not set, will try environment variable TOWER_PASSWORD and then config files
tower_username
string
Username for your Tower or AWX instance.
If value not set, will try environment variable TOWER_USERNAME and then config files
unified_job_template
string
Name of unified job template to run in the workflow.
Can be a job template, project, inventory source, etc.
Omit if creating an approval node (not yet implemented).
validate_certs
boolean
    Choices:
  • no
  • yes
Whether to allow insecure connections to Tower or AWX.
If no, SSL certificates will not be validated.
This should only be used on personally controlled sites using self-signed certificates.
If value not set, will try environment variable TOWER_VERIFY_SSL and then config files

aliases: tower_verify_ssl
verbosity
string
    Choices:
  • 0
  • 1
  • 2
  • 3
  • 4
  • 5
Verbosity applied as a prompt, if job template prompts for verbosity
workflow_job_template
string / required
The workflow job template the node exists in.
Used for looking up the node, cannot be modified after creation.

aliases: workflow

Notes

Note

  • If no config_file is provided we will attempt to use the tower-cli library defaults to find your Tower host information.

  • config_file should contain Tower configuration in the following format host=hostname username=username password=password

Examples

- name: Create a node, follows tower_workflow_job_template example
  tower_workflow_job_template_node:
    identifier: my-first-node
    workflow: example-workflow
    unified_job_template: jt-for-node-use
    organization: Default  # organization of workflow job template
    extra_data:
      foo_key: bar_value

- name: Create parent node for prior node
  tower_workflow_job_template_node:
    identifier: my-root-node
    workflow: example-workflow
    unified_job_template: jt-for-node-use
    organization: Default
    success_nodes:
      - my-first-node

Authors

  • John Westcott IV (@john-westcott-iv)