Question / Confusion re: Variables

19 views
Skip to first unread message

Brian Swanson

unread,
Aug 23, 2015, 5:18:35 PM8/23/15
to Ansible Project
Hey -- was hoping somebody could explain to me what is going on here.

group_vars/all:

db_name: top_level_db


roles/role_name/vars/main.yml:

db_name: role_level_db
db_name_test: "{{db_name}}"

env:
      DB_NAME: "{{db_name}}"
     


When I run code in roles/role_name/tasks/main.yml, when I try to use the variables, I see that db_name_test is as I expect (it returns the value role_level_db), but the env.DB_NAME value is surprising to me (it shows top_level_db)

Any comments/clarification are appreciated!

Thanks

Brian



Reply all
Reply to author
Forward
0 new messages