I’m confused. I can pass already null. Can you give me a working example how to do that with variables? It seems ansible is not passing the type’s properly to the module, even though it does show python’s ‘None’ when using with_items and passing and array of maps.
So does that mean that the “null” I pass should actually not evaluate to python’s “None”? Does that mean my playbook is going to break in the future? What is the spec?
I think I’ve kind of been misunderstood with this post. The actual issue is shown in detail in the pastebin link (if you have a second, run it’ll become clear). So I take it the “null” is just and accidental (undocumented) feature that I’m using? If not, and this is a feature, then I’d consider this behavior a bug since the variable substitution seems to loose the type at some point and it doesn’t look like there is a way to get it to behave properly.
FWIW, I just split up the mysql_user in two calls (one which passes “null” directly and one which passes “{{ item.pw }}”).