Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent exception for Non value #7270

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions awx_collection/plugins/modules/tower_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@


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((
value.startswith('{') and value.endswith('}')
) or (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,14 @@
- assert:
that:
- "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"