I have the following task file:
---
- hosts: tag_env_{{env}}
vars_files:
- "../vars/lookups.yml"
- "../vars/aws-{{env}}.yml"
The {{env}} variable is defined in the lookups.yml:
---
env: "{{ lookup('env','RUNTIME_ENV') }}"
I know that it is working, since I see the following when running my playbook: PLAY [tag_env_development]
However, the variables defined in aws-{{env}}.yml are *not* being loaded [1]. Is there some limitation that I'm missing, or other problem with how I'm attempting to load the files?
1 - My check:
- fail: msg="Bailing out. this play requires 's3_access_key'"
when: s3_access_key is not defined
Michael