In my local.yml I'm able to run the playbook and reference variables within
group_vars/all however I'm not able to access variables within
group_vars/phl-stage. Let's assume the following.
ansible-playbook -i phl-stage site.yml
I have a variable, let's call it "deploy_path" that's different for each
environment. I place the variable within group_vars/<environment name>. If
I include the file (group_vars/phl-stage) within "vars_files" it works but
I would've thought the group file would be automatically loaded?
# cat local.yml
---
# file: local.yml
- hosts: 127.0.0.1
connection: local
vars_files:
- "group_vars/perlservers"
- "group_vars/deploy_list"
# cat phl-stage
---
[webservers]
phl-web1
phl-web2
[perlservers]
phl-perl1
phl-perl2
[phl-stage:children]
webservers
perlservers
Directory structure:
group_vars
all
phl-stage
phl-prod
site.yml
local.yml
--
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/a1142fa4-336b-48de-85dc-96a982d5219d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.