passing variables to docker module

Any tips on reading in the group_vars and making them available to the docker module via “env”? I have searched for examples. I know that i can call out key:values. I don’t know if i’m missing something for using group_vars with docker run and ansible?

As an example. I know that i can include variables like this:

any tips on doing this more dynamically would be appreciated.

env:

DOCKER_DB: “{{DOCKER_DB}}”

JNDI: “{{JNDI}}”

FAKE_VAR: “{{FAKE_VAR}}”

ANOTHER_FAKE_VAR: “{{ANOTHER_FAKE_VAR}}”