vars_files interpolation

24 views
Skip to first unread message

Michael Laccetti

unread,
Feb 24, 2015, 2:13:30 PM2/24/15
to ansible...@googlegroups.com
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
Reply all
Reply to author
Forward
0 new messages