## Ansible uri body bug

Published on:

So there's a very annoying Ansible bug related to the uri body. Let's say you have something like this.

No, you didn't do anything wrong, but you will get a nasty error: TypeError: must be string or buffer, not dict. You can read about the details here: https://github.com/ansible/ansible-modules-core/issues/265

This hack will work around the problem. Essentially you have to add a null value to your JSON so that Ansible won't wrongly turn the JSON string back into a dict.