debugging modules on ansible => 2.3.0

Previously we could configure ansible to leave files in the user’s temp dir in order to troubleshoot/debug Powershell modules. In 2.3.0 all of this got rewritten, so it seems that option is gone.

Being able to troubleshoot the “generated” files is completely crucial (at least for me) when developing and troubleshooting things. What are my options for debug/troubleshooting Powershell with Ansible going forward?

Hi Trond,

You have actually answered the question I asked yesterday regarding module args so thank you for that! Shame it doesn't work now though :slight_smile:

Coincidentally the reason I wanted to find out was because your win_dsc5 module isn't respecting check mode in 2.3. If it's something you're seeing too I am happy to raise an issue on Github and help diagnose the problem?

Haha, glad to help

Regarding check mode: Yep, please raise an issue in the dsc repo on github and I’ll keep that updated. We’ll be moving the win_dsc5 module into Ansible core soon, but for now it lives in the repo
https://github.com/trondhindenes/Ansible-win_dsc

opened issue:
https://github.com/ansible/ansible/issues/23986

Good stuff, cheers. Will set aside some time tomorrow

2.3 removed this unfortunately with the way the execution wrapper now works. I believe Matt was looking at reverting the behavior to what it was before when ANSIBLE_KEEP_REMOTE_FILE is set to true but I’m not sure where he is at with that. Unfortunately this means in the meantime I’m stuck with putting in lots of Fail-Jsons to try and debug what is happening or run the module with a 2.2 install.

yep, lets’ hope he cooks up something :slight_smile: Its a bit of a pita atm.