Maybe I am approaching this the wrong way. I just started with Ansible and I couldn't solve this problem lately:
So this is a snippet of what I am trying to do:
vars:
var1: "true"
var2: "false"
var3: "true"
tasks:
- name: my-name
docker_container:
name: my-name
image: image/image
state: started
cap_drop: all
pull: yes
recreate: yes
restart_policy: always
env:
env1: "value"
env2: "value"
env3: "value"
So the idea is to set var1 to var3 to "true" or "false" and then make the value of env1 to env3 depending on the vars.
So for example:
If var1 is true, the env1 should contain "some value". But if var1 is false, the env1 should contain "an other value".
I would also use AWX and change the value of the vars by "SURVEYS".
I am open to other suggestions, of course. How would you guys solve this?