I have the same issues trying to manage a ton of playbooks that all use the
same resources (which is how I stumbled upon this). However, after reading
the comments, I think I better understand where Ansible is coming from.

(people who know I'm sure will correct me if I'm wrong)

It seems as though Ansible considers each playbook tied to an inventory and
group_vars are also explicitly tied to inventory. Therefore, it would
reason that if you want to logically separate your playbooks into
subdirectories, the separation should be along inventory boundaries such
that the group_vars/ mostly do not need to be shared between playbook
subdirs. Furthermore, if you do have resources that are shared
(./group_vars/all, ./library/, ./filter_plugins/, &c), then you can
accomplish this with symlinks.

That being said, it would be nice to have an option for ansible-playbook
that set a reference directory.

e.g.

    $ ansible-playbook -i thesehosts playbooks/thesehosts/this_playbook.yml
--shared_dir=.

or

    $ ANISBLE_PATH=. ansible-playbook -i thesehosts
playbooks/thesehosts/this_playbook.yml

which would avoid the need for symlinks.

Of course ... could all of this be avoided if we put ALL shared resources
in /etc/ansible/ ? roles, group_vars, filter_plugins, &c?

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CADBUY_iXJw7Bie%3DMZhrqFSdCo1FyH5oFhN-iXL%2BbZYsFUVsFvQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to