Below is a snippet of yaml I am using. I want to call yaml say abc.yml if a variable ENV is set to, say 'abc', and xyz.yml if the variable ( passed as a parameter ) is set to 'xyz'. How do I use if condition in the yaml ?
script:
- ansible-playbook -i <dir> pqr.yaml --verbose -f 10 -e "ENV=${ENV}.... "
- ansible-playbook -i <dir> abc.yaml --verbose -f 10 -e "ENV=${ENV}.... "
- ansible-playbook -i <dir> xyz.yaml --verbose -f 10 -e "ENV=${ENV}.... "
- ansible-playbook -i <dir> hjk.yaml --verbose -f 10 -e "ENV=${ENV}.... "