kostiantyn-nemchenko / ansible-role-patroni

:elephant: Ansible Role for Patroni
https://galaxy.ansible.com/kostiantyn-nemchenko/patroni
MIT License
68 stars 44 forks source link

Don't download dcs roles that I don't want #66

Closed mancdaz closed 5 years ago

mancdaz commented 5 years ago

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

kostiantyn-nemchenko commented 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.

mancdaz commented 5 years ago

@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.

mancdaz commented 5 years ago

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.

kostiantyn-nemchenko commented 5 years ago

@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.

kostiantyn-nemchenko commented 5 years ago

@mancdaz Suggested changes are in the master. Hope you will find this role useful. Thanks for the input.

mancdaz commented 5 years ago

Awesome, thank you!