Closed acehead closed 5 years ago
Hi, @acehead
Thanks for your interest in this project.
The when conditional is not applied to the 'role loading', it is appended to each task in the role. So first Ansible expects to find locally all 3 roles (brianshumate.consul
, andrewrothstein.etcd-cluster
, AnsibleShipyard.ansible-zookeeper
) within the dependencies section and only then it applies the conditional when: not patroni_dcs_exists
to each task in those roles.
Just install the role using ansible-galaxy install kostiantyn-nemchenko.patroni
and all required dependencies will be installed automatically.
Ahha, thanks for clarification, pretty counterintuitive Ansible behavior. We are using your role as a part of a bigger internal set of cookbooks and roles and not using Ansible Galaxy. For now I believe I will comment the dependencies out, as for our case they are not needed
Hi,
When running role with
patroni_dcs_exists: true
set on inventory level execution fails with missing dependencies error (below). This should not happen as dependencies are not needed in this case