Nope, just saying that was a quicker problem. It seems you are modelling role dependencies a bit heavy. People will disagree, and they silenced some important concerns from people who really felt they needed them, but I actually encourage not using role deps for most cases.
What Serge said above about enabling duplicates should resolve your question. On Tue, Jul 29, 2014 at 12:05 PM, John Anderson <[email protected]> wrote: > > > On Tuesday, July 29, 2014 7:48:58 AM UTC-7, Michael DeHaan wrote: >> >> In your original note: >> >> >> dependencies: >> - { role: pythonapp, when: is_legacy is not defined } >> - { role: rubyapp, when: is_legacy is defined } >> >> >> If pythonapp and rubyapp share a common dependency like the role "dbaccess" >> then when pythonapp gets skipped, it currently sets the dbaccess role to be >> skipped even though rubyapp depends on it. >> >> ==== >> >> What I'm saying is in your playbook, do this: >> >> roles: >> >> - { role: pythonapp, when: is_legacy is not defined } >> - { role: rubyapp, when: is_legacy is defined } >> >> In this case, the common dep would not be skipped inadvertantly. >> >> > The problem is the role is higher level, these roles are never declared in > the playbook. The full set looks like this: > > They playbook: > > # surveymonkey.yml > > - hosts: "auth_web_servers" > roles: > - usersvc > > - hosts: "main_web_servers" > roles: > - surveymonkey > > > and then those roles: > > # roles/usersvc/meta/main.yml > dependencies: > - { role: gunicorn, when: use_uwsgi is not defined } > - { role: uwsgi, when: use_uwsgi is defined } > > # roles/surveymonkey/meta/main.yml > dependencies: > - { role: gunicorn, when: use_uwsgi is not defined } > - { role: uwsgi, when: use_uwsgi is defined } > > # roles/gunicorn/meta/main.yml > dependencies: > - { role: python } > > # roles/uwsgi/meta/main.yml > dependencies: > - { role: python } > > > > Are you saying I can declare roles inside meta/main.yml instead of > dependencies? > > -- > 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/b5df3707-b7bc-40fd-9ed7-e2922332ec9f%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/b5df3707-b7bc-40fd-9ed7-e2922332ec9f%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%2BnsWgy93Au4uoUdHXiD6M0Z1eqhy45k-dXTK6VUd3x6XrU%2BLA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
