Translate curl --data-urlencode to Ansible uri module
There is a urlencode filter in Jinja...but there is another problem. A GET
request doesn't have a body; when you run:
curl -G 'http://localhost:8086/query?u=admin&p=password' --data-urlencode "q=SHOW databases"
What actually happens is:
GET /query?u=admin&p=password&q=SHOW%20databases
So you would need to rewrite your task like this:
- name: Create influx users with POST uri: url: "http://localhost:8086/query/?u=admin&p=password?{{ 'q=SHOW databases'|urlencode }}" method: GET