mirror of
https://github.com/ansible/awx.git
synced 2026-03-19 01:47:31 -02:30
update delete
This commit is contained in:
@@ -237,7 +237,7 @@ def main():
|
|||||||
|
|
||||||
if state == 'absent':
|
if state == 'absent':
|
||||||
# If the state was absent we can let the module delete it if needed, the module will handle exiting from this
|
# If the state was absent we can let the module delete it if needed, the module will handle exiting from this
|
||||||
module.delete_if_needed(existing_item)
|
module.delete_if_needed(existing_item, on_continue=True,)
|
||||||
|
|
||||||
unified_job_template = module.params.get('unified_job_template')
|
unified_job_template = module.params.get('unified_job_template')
|
||||||
if unified_job_template:
|
if unified_job_template:
|
||||||
@@ -311,6 +311,9 @@ def main():
|
|||||||
# Due to not able to lookup workflow_approval_templates, find the existing item in another place
|
# Due to not able to lookup workflow_approval_templates, find the existing item in another place
|
||||||
if workflow_job_template_node['related'].get('unified_job_template') is not None:
|
if workflow_job_template_node['related'].get('unified_job_template') is not None:
|
||||||
existing_item = module.get_endpoint(workflow_job_template_node['related']['unified_job_template'])['json']
|
existing_item = module.get_endpoint(workflow_job_template_node['related']['unified_job_template'])['json']
|
||||||
|
if state == 'absent':
|
||||||
|
# If the state was absent we can let the module delete it if needed, the module will handle exiting from this
|
||||||
|
module.delete_if_needed(existing_item)
|
||||||
module.create_or_update_if_needed(
|
module.create_or_update_if_needed(
|
||||||
existing_item, new_fields,
|
existing_item, new_fields,
|
||||||
endpoint='workflow_job_template_nodes/' + str(workflow_job_template_node_id) + '/create_approval_template/', item_type='workflow_job_template_approval_node', on_continue=approval_node,
|
endpoint='workflow_job_template_nodes/' + str(workflow_job_template_node_id) + '/create_approval_template/', item_type='workflow_job_template_approval_node', on_continue=approval_node,
|
||||||
|
|||||||
Reference in New Issue
Block a user