Skip to content

Commit

Permalink
update collection workflow example and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sean-m-sullivan authored and AlanCoding committed Aug 30, 2023
1 parent 951bd1c commit 5ce2055
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 44 deletions.
57 changes: 26 additions & 31 deletions awx_collection/plugins/modules/workflow_job_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,68 +517,63 @@
workflow_nodes:
- identifier: node101
unified_job_template:
name: example-project
name: example-inventory
inventory:
organization:
name: Default
type: inventory_source
related:
success_nodes: []
failure_nodes:
- identifier: node201
always_nodes: []
credentials: []
- identifier: node201
unified_job_template:
organization:
name: Default
name: job template 1
type: job_template
credentials: []
related:
success_nodes:
- identifier: node301
failure_nodes: []
always_nodes: []
credentials: []
- identifier: node202
- identifier: node102
unified_job_template:
organization:
name: Default
name: example-project
type: project
related:
success_nodes: []
failure_nodes: []
always_nodes: []
credentials: []
- identifier: node301
all_parents_must_converge: false
success_nodes:
- identifier: node201
- identifier: node201
unified_job_template:
organization:
name: Default
name: job template 2
name: example-job template
type: job_template
execution_environment:
name: My EE
inventory:
name: Test inventory
name: Demo Inventory
organization:
name: Default
related:
success_nodes:
- identifier: node401
failure_nodes:
- identifier: node301
always_nodes: []
credentials:
- name: cyberark
organization:
name: Default
instance_groups:
- name: SunCavanaugh Cloud
- name: default
labels:
- name: Custom Label
- name: Another Custom Label
organization:
name: Default
register: result
- all_parents_must_converge: false
identifier: node301
unified_job_template:
description: Approval node for example
timeout: 900
type: workflow_approval
name: Approval Node for Demo
related:
success_nodes:
- identifier: node401
- identifier: node401
unified_job_template:
name: Cleanup Activity Stream
type: system_job_template
'''

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@
name: "{{ jt1_name }}"
project: "{{ demo_project_name }}"
inventory: Demo Inventory
ask_inventory_on_launch: true
ask_credential_on_launch: true
ask_labels_on_launch: true
playbook: hello_world.yml
job_type: run
state: present
Expand Down Expand Up @@ -710,7 +713,7 @@
name: "{{ wfjt_name }}"
inventory: Demo Inventory
extra_vars: {'foo': 'bar', 'another-foo': {'barz': 'bar2'}}
schema:
workflow_nodes:
- identifier: node101
unified_job_template:
name: "{{ project_inv_source_result.id }}"
Expand All @@ -721,30 +724,52 @@
related:
failure_nodes:
- identifier: node201
- identifier: node102
unified_job_template:
organization:
name: "{{ org_name }}"
name: "{{ demo_project_name_2 }}"
type: project
related:
success_nodes:
- identifier: node201
- identifier: node201
unified_job_template:
organization:
name: Default
name: "{{ jt1_name }}"
type: job_template
credentials: []
inventory:
name: Demo Inventory
organization:
name: Default
related:
success_nodes:
- identifier: node401
failure_nodes:
- identifier: node301
- identifier: node202
unified_job_template:
organization:
name: "{{ org_name }}"
name: "{{ project_inv_source }}"
type: project
always_nodes: []
credentials:
- name: "{{ scm_cred_name }}"
organization:
name: Default
instance_groups:
- name: "{{ ig1 }}"
labels:
- name: "{{ lab1 }}"
organization:
name: "{{ org_name }}"
- all_parents_must_converge: false
identifier: node301
unified_job_template:
organization:
name: Default
name: "{{ jt2_name }}"
type: job_template
- identifier: Cleanup Job
description: Approval node for example
timeout: 900
type: workflow_approval
name: "{{ approval_node_name }}"
related:
success_nodes:
- identifier: node401
- identifier: node401
unified_job_template:
name: Cleanup Activity Stream
type: system_job_template
Expand Down

0 comments on commit 5ce2055

Please sign in to comment.