vitabaks / postgresql_cluster

PostgreSQL High-Availability Cluster (based on Patroni). Automating with Ansible.
https://postgresql-cluster.org
MIT License
1.69k stars 411 forks source link

roles/consul/requirements.yml misses `netaddr` package #380

Closed olwe0002 closed 1 year ago

olwe0002 commented 1 year ago

to install a cluster type C with consul, you advice to install further requirements for consul.

this results in the following error:

TASK [consul : Create configuration] *******************************************
fatal: [10.0.0.22]: FAILED! => {}
MSG:
An unhandled exception occurred while running the lookup plugin 'template'. Error was a <class 'ansible.errors.AnsibleFilterError'>, original message: The ipwrap filter requires python's netaddr be installed on the ansible controller. The ipwrap filter requires python's netaddr be installed on the ansible controller
vitabaks commented 1 year ago

@olwe0002

Please check whether the netaddr package is installed on your server (where you run ansible)

pip list | grep netaddr
olwe0002 commented 1 year ago

its missing of course. shouldn't it be contained in roles/consul/requirements.yml if it is needed for this role? that's my point here.

vitabaks commented 1 year ago

https://github.com/vitabaks/postgresql_cluster/blob/master/roles/consul/requirements.yml

---
collections:
  - name: ansible.utils
    version: 2.6.1

there is nothing about netaddr here, only the collection necessary for work is described.

I will check later and automate the installation of netaddr package if it is not already there.

vitabaks commented 1 year ago

Fixed here https://github.com/vitabaks/postgresql_cluster/pull/442