The requirements file is a way to pull down everything your package would need, from different repos, possibly specifying different versions and sources.
The role deps file is really only intended for Galaxy, to work as a package manager, for things that are also on Galaxy. Requirements.yml isn't required for anything on galaxy, or for sharing roles, but is meant as an analog for specifying a list of roles to suck down. For instance, suppose you have 5 types of servers to deploy. One type of server uses 10 roles, another uses 2 roles, another uses 3 roles. You might have one requirements.yml that says "download all these roles", and it gets your ansible checkout ready to go. Dependencies don't just suck down roles - they make sure those roles are *applied*, so it's inappropriate to have a role that says "everything.yml" with just deps, when they are unrelated concerns. On Wed, Oct 15, 2014 at 1:13 AM, mahmoudimus <[email protected]> wrote: > Hi there, > > I would like some clarification on this pattern I'm noticing in the > documentation in regards to dependencies installed via Ansible Galaxy ( > http://docs.ansible.com/galaxy.html) and the Role Dependencies ( > http://docs.ansible.com/playbooks_roles.html#role-dependencies). > > When would you choose requirements.yml over a meta/main.yml with its > dependencies list filled out? There might be some unnecessary duplication. > > The only thing I've been able to reason was that you would use > meta/main.yml dependencies when the intent is to distribute the > encompassing role. > > If one has playbooks that require specific roles installed, one would put > them in the requirements.yml. > > So for distributable roles that also have playbooks, it is assumed that if > one is operating on that role directly, then requirements.yml is necessary. > If one is embedding that role, then meta/main.yml should define the > dependencies that are required to embed that role. > > Not sure if my understanding is correct. > > Thanks for the help. > > -- > 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/7874cc03-0ee4-4b68-8cb6-acd3180091d8%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/7874cc03-0ee4-4b68-8cb6-acd3180091d8%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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/CA%2BnsWgxaimn_73MfqnFfRGe8V7_rcjcf%2B5NnFOh4so2OM21qYQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
