Here is what my current `ansible/` directory looks like:

├── development
│   └── hosts
├── production
│   └── hosts
├── group_vars
│   └── prod.example.com
│   └── dev1.example.com
│   └── dev2.example.com
├── playbooks
│   ├── prod.example.com.com
│   │   └── site.yml
│   ├── dev1.example.com.com
│   │   └── site.yml
│   ├── dev2.example.com.com
│   │   └── site.yml
└── roles
    ├── webservers
        ├── templates
        │   └── main.yml
        ├── tasks
        │   └── main.yml
        └── vars
            └── main.yml

In my `roles/webservers/templates/main.yml`, I would reference variables 
such as

   1. `http_port`
   2. `document_root`
   3. `server_name`

I can easily reference them in my `roles/webservers/templates/main.yml` by 
typing the following into my template:

   1. `{{ http_port }}`
   2. `{{ document_root }}`
   3. `{{ server_name }}`

I know when I type it like the above, it references my 
`roles/webservers/vars/main.yml` file; which contain variables for 
production.

*I would like to change the 3 variables if I am referencing my 
`dev1.example.com` and `dev2.example.com` environments, but I am unsure on 
how to do this with using *`group_vars/dev1.example.com` *and* 
`group_vars/dev2.example.com`

-- 
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/0b67c9a2-a639-43ad-979d-647acccd3a2f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to