Closed mancdaz closed 5 years ago
@mancdaz Yes, all 3 roles will be downloaded but only one of them will be ultimately applied to your infrastructure depending on the value of patroni_dcs
variable. Currently, AFAIK there is no way in Ansible to achieve what you want. Please, also see this issue to get more details. Would appreciate any ideas or workarounds if you have ones.
@kostiantyn-nemchenko ok thanks.
In that case can I suggest you at least specify a version in your dependency, because at the moment the zookeeper role download will fail due to this issue. Basically, they removed the 'v' from the latest version 0.23.0 and don't appear to be responsive to suggestions of fixing it.
Personally, I would document the need for a dcs, but not enforce any roles as dependencies. There are many use cases where a user will already have a dcs, and has no need for any of those roles (or indeed wants to use a different role to manage their dcs). I'd rather see less forced upon the user, and give them the option to use composability in their playbooks instead. Just my 2p.
@mancdaz Thanks for the valuable suggestions. I'll try to update the docs and the dependency file as soon as possible, because you are not the first one to face this problem.
@mancdaz Suggested changes are in the master. Hope you will find this role useful. Thanks for the input.
Awesome, thank you!
How do I ignore the roles that I don't want from the role meta/main.yml? I am not going to use zookeeper (and that role is broken due to version number scheme change), nor etcd. I want to use only consul, but all three roles get downloaded when I install this role with ansible-galaxy