mirror of
https://github.com/ansible/awx.git
synced 2026-05-19 14:57:39 -02:30
bugfix: add scm_branch to optional_args for workflow_launch (#13254)
* add scm_branch to optional_args * add in limits * Update workflow_launch.py remove json from import to pass linting. --------- Co-authored-by: dien nguyen <nguyen.d@gmail.comn> Co-authored-by: Jessica Steurer <70719005+jay-steurer@users.noreply.github.com>
This commit is contained in:
@@ -91,7 +91,6 @@ EXAMPLES = '''
|
|||||||
'''
|
'''
|
||||||
|
|
||||||
from ..module_utils.controller_api import ControllerAPIModule
|
from ..module_utils.controller_api import ControllerAPIModule
|
||||||
import json
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
@@ -116,15 +115,18 @@ def main():
|
|||||||
name = module.params.get('name')
|
name = module.params.get('name')
|
||||||
organization = module.params.get('organization')
|
organization = module.params.get('organization')
|
||||||
inventory = module.params.get('inventory')
|
inventory = module.params.get('inventory')
|
||||||
optional_args['limit'] = module.params.get('limit')
|
|
||||||
wait = module.params.get('wait')
|
wait = module.params.get('wait')
|
||||||
interval = module.params.get('interval')
|
interval = module.params.get('interval')
|
||||||
timeout = module.params.get('timeout')
|
timeout = module.params.get('timeout')
|
||||||
|
|
||||||
# Special treatment of extra_vars parameter
|
for field_name in (
|
||||||
extra_vars = module.params.get('extra_vars')
|
'limit',
|
||||||
if extra_vars is not None:
|
'extra_vars',
|
||||||
optional_args['extra_vars'] = json.dumps(extra_vars)
|
'scm_branch',
|
||||||
|
):
|
||||||
|
field_val = module.params.get(field_name)
|
||||||
|
if field_val is not None:
|
||||||
|
optional_args[field_name] = field_val
|
||||||
|
|
||||||
# Create a datastructure to pass into our job launch
|
# Create a datastructure to pass into our job launch
|
||||||
post_data = {}
|
post_data = {}
|
||||||
|
|||||||
Reference in New Issue
Block a user