Let's assume i have a role glusterfs which configures a GlusterFS cluster on hosts glusterfs-servers.
Furthermore i have a role storage-clients which wants to mount a volume from this GlusterFS cluster on hosts storage-clients.
So to ensure that the GlusterFS cluster is successfully setup, I added the following to role/storage-clients/meta/main.yml:
---
dependencies:
- { role: glusterfs, hosts: glusterfs-servers }
But this causes ansible to run the glusterfs role on the hosts in storage-clients which obviously fails.
I have the glusterfs role before the storage-clients role in my playbook, but i wanted to ensure that my roles are as fault-proof as possible.
How is this possible?