diff options
author | softwarefactory-project-zuul[bot] <33884098+softwarefactory-project-zuul[bot]@users.noreply.github.com> | 2021-05-25 19:22:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-25 19:22:08 +0200 |
commit | e28bed5a6c8cdf67123bef19f9a3671aefd8c7ff (patch) | |
tree | 6477fa0b773ac155a499c7fc027dc5a6e6f28958 /awx_collection | |
parent | Merge pull request #10261 from shanemcd/bump-receptor (diff) | |
parent | Document usage of workflow job template nodes with approvals (diff) | |
download | awx-e28bed5a6c8cdf67123bef19f9a3671aefd8c7ff.tar.xz awx-e28bed5a6c8cdf67123bef19f9a3671aefd8c7ff.zip |
Merge pull request #9904 from MaximilianMeister/approval-docs
Document usage of workflow job template nodes with approvals
SUMMARY
I'm not sure if this procedure is mandatory, but it was the only way it worked for me.
It's already documented in one sentence that you can create all workflow template nodes first and then link them later. However in the Examples it has been missing to make it explicit, as it's not really intuitive when you create the nodes and link them at the same time, it won't work and you run into #8777
ISSUE TYPE
Docs Pull Request
AWX VERSION
awx: 19.0.0
Reviewed-by: Shane McDonald <me@shanemcd.com>
Reviewed-by: Maximilian Meister <None>
Reviewed-by: Alan Rominger <arominge@redhat.com>
Diffstat (limited to 'awx_collection')
-rw-r--r-- | awx_collection/plugins/modules/tower_workflow_job_template_node.py | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/awx_collection/plugins/modules/tower_workflow_job_template_node.py b/awx_collection/plugins/modules/tower_workflow_job_template_node.py index bb3c64fcab..b878af8d53 100644 --- a/awx_collection/plugins/modules/tower_workflow_job_template_node.py +++ b/awx_collection/plugins/modules/tower_workflow_job_template_node.py @@ -174,6 +174,54 @@ EXAMPLES = ''' 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 ''' from ..module_utils.tower_api import TowerAPIModule |