"Provides" to ease dependencies?

11 views
Skip to first unread message

Toni Mueller

unread,
Aug 13, 2018, 5:47:22 PM8/13/18
to ansible...@googlegroups.com

Hi,

from normal package management systems, I am used to have "Provides"
which allows me to install any of a set of packages to satisfy a
dependency (eg. "Provides: mail-transport-agent"). I was wondering how
to best achieve a similar effect with Ansible, so I do not have to
hardwire all the role names in many places. Eg. if I want to switch
from one role that installs MySQL to one of the dozens of other roles
which do "basically" the same, I would like to just depend on a role
that provides "database-server", then decide later which database engine
I actually want by selecting one role that installs a database server
without having to go back to all the roles which are installing
applications depending on a database server to reference a different
role.

How are you guys tackling this kind of problem?


Kind regards,
Toni

Jonathan Lozada De La Matta

unread,
Aug 13, 2018, 10:07:21 PM8/13/18
to ansible...@googlegroups.com
can you provide a more in dept example of how you currently do 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/20180813214709.xfofs4zt3kcqxls4%40spruce.office.oeko.net.
For more options, visit https://groups.google.com/d/optout.

Brian Coca

unread,
Aug 14, 2018, 11:49:07 AM8/14/18
to Ansible Project
You could always create a 'virtual role' and symlink the 'providing
role' into that name.



--
----------
Brian Coca
Reply all
Reply to author
Forward
0 new messages