mirror of
https://github.com/ansible/awx.git
synced 2026-05-17 14:27:42 -02:30
Fix to handle parameters with Boolean values correctly
* Addresses the issue #10057 Signed-off-by: Hideki Saito <saito@fgrep.org>
This commit is contained in:
@@ -751,7 +751,7 @@ def main():
|
|||||||
'webhook_service',
|
'webhook_service',
|
||||||
):
|
):
|
||||||
field_val = module.params.get(field_name)
|
field_val = module.params.get(field_name)
|
||||||
if field_val:
|
if field_val is not None:
|
||||||
new_fields[field_name] = field_val
|
new_fields[field_name] = field_val
|
||||||
|
|
||||||
if 'extra_vars' in new_fields:
|
if 'extra_vars' in new_fields:
|
||||||
|
|||||||
@@ -159,12 +159,30 @@
|
|||||||
extra_vars: {'foo': 'bar', 'another-foo': {'barz': 'bar2'}}
|
extra_vars: {'foo': 'bar', 'another-foo': {'barz': 'bar2'}}
|
||||||
labels:
|
labels:
|
||||||
- "{{ lab1 }}"
|
- "{{ lab1 }}"
|
||||||
|
ask_inventory_on_launch: true
|
||||||
|
ask_scm_branch_on_launch: true
|
||||||
|
ask_limit_on_launch: true
|
||||||
|
ask_variables_on_launch: true
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
that:
|
that:
|
||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
|
# Turn off ask_ * settings to test that the issue/10057 has been fixed
|
||||||
|
- name: Turn ask_* settings OFF
|
||||||
|
tower_workflow_job_template:
|
||||||
|
name: "{{ wfjt_name }}"
|
||||||
|
ask_inventory_on_launch: false
|
||||||
|
ask_scm_branch_on_launch: false
|
||||||
|
ask_limit_on_launch: false
|
||||||
|
ask_variables_on_launch: false
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- assert:
|
||||||
|
that:
|
||||||
|
- "result is changed"
|
||||||
|
|
||||||
# Node actions do what this schema command used to do
|
# Node actions do what this schema command used to do
|
||||||
# schema: [{"success": [{"job_template": "{{ jt1_name }}"}], "job_template": "{{ jt2_name }}"}]
|
# schema: [{"success": [{"job_template": "{{ jt1_name }}"}], "job_template": "{{ jt2_name }}"}]
|
||||||
- name: Create leaf node
|
- name: Create leaf node
|
||||||
|
|||||||
Reference in New Issue
Block a user