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. The only way I have been able to fix this is by setting `allow_duplicates: yes` on all roles that may be inherited by both but this makes the runtime of my playbooks pretty slow because its re-running a bunch of tasks.Is there a way I could get this inheritance model to work where the dbaccess role doesn't get skipped if the role running it does depend on it?
--
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-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/7ed0e1a6-9bc8-4e71-8fdf-316c0d714b80%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
If I have two jobs: being a parent and a restaurant cook, one of the tasks of both of these jobs is doing the dishes. If Istop being a restaurant cook this doesn't mean I get to stop doing dishes as a parent.
Would love to understand this model more and why skipping a role would mean that any others roles who have explicitlydefined dependencies would be ignored.
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.
--
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-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAEhzMJA73XD-qvneW1HkwWsZVfy8SpEbdrxiWt-zZM_%3D-G4A1A%40mail.gmail.com.
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.
--
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-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/b5df3707-b7bc-40fd-9ed7-e2922332ec9f%40googlegroups.com.
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.
--
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-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/8f94d4a1-c6d4-4576-8606-68d54427e6d6%40googlegroups.com.