mirror of
https://github.com/ansible/awx.git
synced 2026-05-06 17:07:36 -02:30
Merge pull request #7270 from john-westcott-iv/fix_tower_settings_none
Prevent exception for Non value Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
@@ -80,6 +80,10 @@ except ImportError:
|
|||||||
|
|
||||||
|
|
||||||
def coerce_type(module, value):
|
def coerce_type(module, value):
|
||||||
|
# If our value is already None we can just return directly
|
||||||
|
if value is None:
|
||||||
|
return value
|
||||||
|
|
||||||
yaml_ish = bool((
|
yaml_ish = bool((
|
||||||
value.startswith('{') and value.endswith('}')
|
value.startswith('{') and value.endswith('}')
|
||||||
) or (
|
) or (
|
||||||
|
|||||||
@@ -74,3 +74,14 @@
|
|||||||
- assert:
|
- assert:
|
||||||
that:
|
that:
|
||||||
- "result is changed"
|
- "result is changed"
|
||||||
|
|
||||||
|
- name: Handle an omit value
|
||||||
|
tower_settings:
|
||||||
|
name: AWX_PROOT_BASE_PATH
|
||||||
|
value: '{{ junk_var | default(omit) }}'
|
||||||
|
register: result
|
||||||
|
ignore_errors: true
|
||||||
|
|
||||||
|
- assert:
|
||||||
|
that:
|
||||||
|
- "'Unable to update settings' in result.msg"
|
||||||
|
|||||||
Reference in New Issue
Block a user