I'm passing env variables to a Docker container in an ansible playbook, how do I set an Ansible variable in the key in the key/value of an env?
So this:
- name: webproxy container
docker_container:
name: "webproxy"
image: "webproxy"
env:
SERVICE_443_NAME: "webproxy"
becomes this:
- name: webproxy container
docker_container:
name: "webproxy"
image: "webproxy"
env:
SERVICE_{{ port_number }}_NAME: "webproxy"