-
Notifications
You must be signed in to change notification settings - Fork 110
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
Check if param flag values are defined, not truthiness #366
base: main
Are you sure you want to change the base?
Check if param flag values are defined, not truthiness #366
Conversation
Thanks @zjleblanc |
@Alex-Izquierdo sounds like a plan. Would you like me to close this PR for now? Or start looking at other params and start adding to it? |
Hi @zjleblanc Otherwise I can recreate the PR with the test. Thank you very much. |
@Alex-Izquierdo added an assert based on the existing integration tasks - will check back to make sure it passes. |
for more information, see https://pre-commit.ci
- name: Assert that swap single source flag is disabled | ||
ansible.builtin.assert: | ||
that: | ||
- not _result_activation_info.activations[0].swap_single_source |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need this assertion, it is a feature of the collection for configuring event streams. not a field in the backend, rest LGTM
Addresses #365 by checking if module parameters which represent flags are defined, preventing evaluation of their truthyness. Current behavior will ignore an incoming value of false and default back to true because of the conditional logic:
Example:
module.params["enabled"] = False
if module.params.get("enabled")
evaluates to False, but the intent is to determine if it has been defined, so we want this to evaluate to True.This PR addresses the same issue for
swap_single_source
param.