# "Provides" to ease dependencies?

**URL:** <https://forum.ansible.com/t/provides-to-ease-dependencies/28323>\
**Category:** Ansible Project\
**Created:** [August 13, 2018, 9:47pm UTC](https://forum.ansible.com/t/provides-to-ease-dependencies/28323 "2018-08-13T21:47:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Toni\_Mueller](https://avatars.discourse-cdn.com/v4/letter/t/54ee81/32.png) [@Toni\_Mueller](https://forum.ansible.com/u/Toni_Mueller)\
**Post date:** [August 13, 2018, 9:47pm UTC](https://forum.ansible.com/t/provides-to-ease-dependencies/28323/1 "2018-08-13T21:47:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Jonathan\_Lozada\_De\_L](https://avatars.discourse-cdn.com/v4/letter/j/eb8c5e/32.png) [@Jonathan\_Lozada\_De\_L](https://forum.ansible.com/u/Jonathan_Lozada_De_L)\
**Post date:** [August 14, 2018, 2:07am UTC](https://forum.ansible.com/t/provides-to-ease-dependencies/28323/2 "2018-08-14T02:07:00Z")

</div>

can you provide a more in dept example of how you currently do it?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [August 14, 2018, 3:48pm UTC](https://forum.ansible.com/t/provides-to-ease-dependencies/28323/3 "2018-08-14T15:48:44Z")

</div>

You could always create a 'virtual role' and symlink the 'providing  
role' into that name.
