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

Add simple if/else statement to honor ansible_check_mode within CLI modules #103

Merged
merged 4 commits into from
Sep 20, 2022

Conversation

darksoul42
Copy link
Contributor

SUMMARY

Fixes #102
Just a very simple fix to honor ansible_check_mode and make the modules safer to use for everyone.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

na_ontap_command
na_ontap_rest_cli

ADDITIONAL INFORMATION

Unless this logic is added, the "check_mode" option in ansible is not honored.
Unsuspecting users will expect to be protected by the -C command line option,
which will be passed to the module... but ignored.

In its current implementation, the module will execute a command even when a user would not expect it.
My fix merely restores this behavior by having the module merely state what it would do instead.

@carchi8py carchi8py added this to the 21.24.0 milestone Sep 12, 2022
@lonico lonico merged commit 1cc1f04 into ansible-collections:main Sep 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

na_ontap_command does not honor ansible_check_mode
3 participants