shanemcd / shanemcd.awx / 20.0.14 / module / workflow_job_template_node create, update, or destroy Automation Platform Controller workflow job template nodes. Authors: John Westcott IV (@john-westcott-iv) preview | supported by communityshanemcd.awx.workflow_job_template_node (20.0.14) — module
Install with ansible-galaxy collection install shanemcd.awx:==20.0.14
collections: - name: shanemcd.awx version: 20.0.14
Create, update, or destroy Automation Platform Controller 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.
- name: Create a node, follows workflow_job_template example 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 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
- name: Create workflow with 2 Job Templates and an approval node in between block: - name: Create a workflow job template tower_workflow_job_template: name: my-workflow-job-template ask_scm_branch_on_launch: true organization: Default - name: Create 1st node tower_workflow_job_template_node: identifier: my-first-node workflow_job_template: my-workflow-job-template unified_job_template: some_job_template organization: Default - name: Create 2nd approval node tower_workflow_job_template_node: identifier: my-second-approval-node workflow_job_template: my-workflow-job-template organization: Default approval_node: description: "Do this?" name: my-second-approval-node timeout: 3600 - name: Create 3rd node tower_workflow_job_template_node: identifier: my-third-node workflow_job_template: my-workflow-job-template unified_job_template: some_other_job_template organization: Default - name: Link 1st node to 2nd Approval node tower_workflow_job_template_node: identifier: my-first-node workflow_job_template: my-workflow-job-template organization: Default success_nodes: - my-second-approval-node - name: Link 2nd Approval Node 3rd node tower_workflow_job_template_node: identifier: my-second-approval-node workflow_job_template: my-workflow-job-template organization: Default success_nodes: - my-third-node
limit: description: - Limit to act on, applied as a prompt, if job template prompts for limit type: str state: choices: - present - absent default: present description: - Desired state of the resource. type: str job_tags: description: - Job tags applied as a prompt, if job template prompts for job tags type: str job_type: choices: - run - check description: - Job type applied as a prompt, if job template prompts for job type type: str diff_mode: description: - Run diff mode, applied as a prompt, if job template prompts for diff mode type: bool inventory: description: - Inventory applied as a prompt, if job template prompts for inventory type: str skip_tags: description: - Tags to skip, applied as a prompt, if job tempalte prompts for job tags type: str verbosity: choices: - '0' - '1' - '2' - '3' - '4' - '5' description: - Verbosity applied as a prompt, if job template prompts for verbosity type: str extra_data: default: {} description: - Variables to apply at launch time. - Will only be accepted if job template prompts for vars or has a survey asking for those vars. type: dict identifier: description: - An identifier for this node that is unique within its workflow. - It is copied to workflow job nodes corresponding to this node. required: true type: str scm_branch: description: - SCM branch applied as a prompt, if job template prompts for SCM branch type: str credentials: description: - Credentials to be applied to job as launch-time prompts. - List of credential names. - Uniqueness is not handled rigorously. elements: str type: list always_nodes: description: - Nodes that will run after this node completes. - List of node identifiers. elements: str type: list organization: description: - The organization of the workflow job template the node exists in. - Used for looking up the workflow, not a direct model field. type: str approval_node: description: - A dictionary of Name, description, and timeout values for the approval node. - This parameter is mutually exclusive with C(unified_job_template). suboptions: description: description: - Optional description of this workflow approval template. type: str name: description: - Name of this workflow approval template. required: true type: str timeout: description: - The amount of time (in seconds) before the approval node expires and fails. type: int type: dict failure_nodes: description: - Nodes that will run after this node on failure. - List of node identifiers. elements: str type: list success_nodes: description: - Nodes that will run after this node on success. - List of node identifiers. elements: str type: list validate_certs: aliases: - tower_verify_ssl description: - Whether to allow insecure connections to AWX. - If C(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 C(CONTROLLER_VERIFY_SSL) and then config files type: bool controller_host: aliases: - tower_host description: - URL to your Automation Platform Controller instance. - If value not set, will try environment variable C(CONTROLLER_HOST) and then config files - If value not specified by any means, the value of C(127.0.0.1) will be used type: str controller_password: aliases: - tower_password description: - Password for your controller instance. - If value not set, will try environment variable C(CONTROLLER_PASSWORD) and then config files type: str controller_username: aliases: - tower_username description: - Username for your controller instance. - If value not set, will try environment variable C(CONTROLLER_USERNAME) and then config files type: str lookup_organization: description: - Organization the inventories, job template, project, inventory source the unified_job_template exists in. - If not provided, will lookup by name only, which does not work with duplicates. type: str unified_job_template: description: - 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. - This parameter is mutually exclusive with C(approval_node). type: str controller_oauthtoken: aliases: - tower_oauthtoken description: - The 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 token module. - If value not set, will try environment variable C(CONTROLLER_OAUTH_TOKEN) and then config files type: raw version_added: 3.7.0 version_added_collection: shanemcd.awx workflow_job_template: aliases: - workflow description: - The workflow job template the node exists in. - Used for looking up the node, cannot be modified after creation. required: true type: str controller_config_file: aliases: - tower_config_file description: - Path to the controller config file. - If provided, the other locations for config files will not be considered. type: path all_parents_must_converge: description: - If enabled then the node will only run if all of the parent nodes have met the criteria to reach this node type: bool