In ansible playbook docker parameter extra_host takes two parts host: ip_address. I am trying to pass the host and ipaddress in as variables. They are from prompt vars. The end
Make server_host_ip dict with set_fact before your task:
server_host_ip
set_fact
- set_fact: server_host_ip: "{'{{host_name}}':'{{host_ip}}'}"
And use {{server_host_ip}} in the docker module.
{{server_host_ip}}
docker