Hi,
I'm also in the situation to get "many" different projects under control
and use following directory structure:
- one folder per project with dependeing playbooks and roles
- global inventory with one folder per stage (since the project share hosts
I made only one inventory )
- group_vars and host_vars only in inventory
- global "site.yml' including playbooks out of projects
- "only for "global_roles" I had to add one Entry in roles_path in my
ansible.cfg
I don't know if this is good practice. Improvements and tips are welcome :D
Details:
site.yml example:
---
- include project1/deployment.yml
- include project2/play.yml
...
Directory-Layout:
ansible/
├── site.yml
├── project1/
│ ├── character1.yml
│ ├── character2.yml
│ ├── config_mgmt.yml
│ ├── deployment.yml
│ ├── library/
│ │ └── module1
│ ├── roles/
│ │ ├── role1/
│ │ └── role2/
│ └── site.yml
├── project2/
│ ├── roles/
│ └── ...
├── project3/
├── .../
├── global_roles/
│ ├── role1/
│ └── role2/
├── inventory/
│ ├── development/
│ │ ├── project1
│ │ ├── project2
│ │ ├── ....
│ │ ├── group_vars/
│ │ └── host-vars/
│ ├── integration/
│ │ └── ...
│ ├── staging/
│ └── production/
Cheers
Ulli
Am Donnerstag, 28. Mai 2015 12:55:24 UTC+2 schrieb Torsten Reinhard:
>
> in addition, also the group_vars cannot be resolved - they are expected
> relative to the playbook(s) - or the inventory hosts file.
>
> => how do i define common group_vars/all.yml - when i want to structure my
> playbooks in (sub) directories ?
>
> Regards, Torsten
>
--
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/b037147b-4dd0-4c62-a526-4acb1c558f2f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.