ansible-playbook with ansible.yaml fails when python-netaddr is missing
Closed this issue · 1 comments
digitalgopnik commented
Hello @fnkr!
Thanks for this helpful repository :) I came across this repository, because i was searching for a well documented and working example, which provides a kubernetes cluster with terraform (and ansible) on hetzner-cloud-servers.
Did you face the following issue during ansible-playbook ansible.yaml
?
TASK [k8s : Template kubelet service overrides] *************************************************************************************************************
fatal: [testkube-control-001]: FAILED! => {"msg": "The ipaddr filter requires python's netaddr be installed on the ansible controller"}
fatal: [testkube-control-002]: FAILED! => {"msg": "The ipaddr filter requires python's netaddr be installed on the ansible controller"}
fatal: [testkube-control-003]: FAILED! => {"msg": "The ipaddr filter requires python's netaddr be installed on the ansible controller"}
fatal: [testkube-worker-001]: FAILED! => {"msg": "The ipaddr filter requires python's netaddr be installed on the ansible controller"}
fatal: [testkube-worker-002]: FAILED! => {"msg": "The ipaddr filter requires python's netaddr be installed on the ansible controller"}
fatal: [testkube-worker-003]: FAILED! => {"msg": "The ipaddr filter requires python's netaddr be installed on the ansible controller"}
NO MORE HOSTS LEFT ******************************************************************************************************************************************
PLAY RECAP **************************************************************************************************************************************************
testkube-control-001 : ok=15 changed=0 unreachable=0 failed=1 skipped=1 rescued=0 ignored=0
testkube-control-002 : ok=15 changed=0 unreachable=0 failed=1 skipped=1 rescued=0 ignored=0
testkube-control-003 : ok=15 changed=0 unreachable=0 failed=1 skipped=1 rescued=0 ignored=0
testkube-worker-001 : ok=15 changed=0 unreachable=0 failed=1 skipped=1 rescued=0 ignored=0
testkube-worker-002 : ok=15 changed=0 unreachable=0 failed=1 skipped=1 rescued=0 ignored=0
testkube-worker-003 : ok=15 changed=0 unreachable=0 failed=1 skipped=1 rescued=0 ignored=0
Anyway, if not, i think you should add a hint to the README, so that other users will know, they have to install python3-netaddr
, python-netaddr
or simply pip3 install netaddr
(for virtualenv) as described in here: ansible/workshops#115
fnkr commented
Please install dependencies from requirements.txt
first, e.g.
python3 -m venv venv
venv/bin/pip install -r requirements.txt
. venv/bin/activate
Instructions are now in the README too.