I have different staging environments under inventory.

Inventory/
 Qa/
   Group_vars
   hosts.ini
 Uat/
   group_vars
   hosts.ini
 Prod/
   group_vars
   hosts.ini

I want to choose inventory file based on environment.

Within my playbooks I also use env variable.

When I run my ansible playbook like this it doesn't work. How can I do this?

ansible-playbook -i inventory/{{ env }}/ -e "env=prod" 

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/a3626294-830b-45a3-933e-d5b3cf29694f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to