CiscoDevNet/ansible-meraki

meraki_mx_site_to_site_vpn check mode is posting changes

DerrickTJ opened this issue · 9 comments

meraki_mx_site_to_site_vpn "--check" is actually pushing changes instead of checking that it should make the change and not post them.

ansible [core 2.14.1]
python version = 3.11.1

Just verified the module, it is marked that is supports check mode supports_check_mode=True but doesn't have any checks in place to verify it is in check mode. Missing: if meraki.module.check_mode is True:

Hello!
I see that issue in the code. Can you provide the example playbook for test it?

Thank you!
Marcin

The example in the documentation should work just fine. It's nothing specific to how I write it.

To be honest I think like you said we have to add the missing if statement. You are absolutely right. As far I see that statement is appeared in the another modules. What do you think @kbreit?

Thank you for posting that issue @DerrickTJ ;)

I would have added it myself but for some odd reason we cannot edit the code and submit PRs for them to get merged here in this org.
Guess I have access to edit now or I was just blind.

Thanks for submitting the bug report. We can either disable check mode or look into adding support for it. The former is easier than the latter but neither should be awful. Do you have a use case for check mode in your environment?

We run --check as our pretest for all ansible ran playbooks. Once the check has been completed, then a PR can be approved/merged.

For now, I just have this module to skip during the check phase when: not ansible_check_mode

Makes sense. Let me look at issuing a fix for this. Are you able to run test code to verify my changes are complete?

Yeah, I should be able to.