What a fun day.
First we had to debug why #ansible #molecule wasn't working on a colleagues computer.
Turned out that molecule messes with the ANSIBLE_COLLECTION_PATH which we set explicitly only to a derivation path in the #nix store.
Luckily it's possible to override it and now we have this in our molecule config.
env:
ANSIBLE_COLLECTION_PATH: "${ANSIBLE_COLLECTION_PATH}"
Next, I was debugging for hours a custom module only to realize that Ansible, because of YAML, converts strings that look like timestamps to datetime objects, however because of jinja it then converts that into a string similar to this: `"{'date': datetime.date(2018, 10, 30)}"`
There would be a fix for it since 2.7 but that isn't enabled by default.
https://github.com/ansible/ansible/issues/47795
What a mess.