Hi, I would like to conditionally execute some tasks within a play (or even the entire play itself) only if I'm setting up a development environment. What is the best way to perform such conditional execution?
One way I can think of is to define a variable (say "deploy_env=true") in my dev inventory file (hosts.dev), then use the "when" statement within the conditional tasks to look for that variable (i.e. when: deploy_env == true). Is this a good approach or is there a better way to define and run environment-specific tasks/plays? Thanks, Shaunak -- 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/5a82dc55-9dbf-4c5b-a420-77c5c7a3af43%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
