question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to deploy dashboard - template error while templating string: No filter named ''ansible.utils.ipwrap"

See original GitHub issue

Bug Report

What happened: Manually removed the dashboard containers & images from the [grafana-server] host, since it changed between stable.5 and stable.6 and the purge-dashboard.yml component doesn’t work even after updating the bits of here.

Host only reflects the current containers running:


ubuntu@B-03-11-cephctl:~$ sudo docker ps
CONTAINER ID   IMAGE                                                          COMMAND                  CREATED       STATUS       PORTS     NAMES
69c22ed0f6fd   quay.io/ceph/daemon:v6.0.8-stable-6.0-pacific-centos-stream8   "/opt/ceph-container…"   7 days ago    Up 6 days              ceph-rgw-B-03-11-cephctl-rgw0
d3dc10ec4da9   quay.io/ceph/daemon:v6.0.8-stable-6.0-pacific-centos-stream8   "/opt/ceph-container…"   7 days ago    Up 7 days              ceph-mds-B-03-11-cephctl
1a06985ecbbb   quay.io/ceph/daemon:v6.0.8-stable-6.0-pacific-centos-stream8   "/opt/ceph-container…"   7 days ago    Up 7 days              ceph-mgr-B-03-11-cephctl
b4f08b679bef   quay.io/ceph/daemon:v6.0.8-stable-6.0-pacific-centos-stream8   "/opt/ceph-container…"   7 days ago    Up 7 days              ceph-mon-B-03-11-cephctl
dfc0d582ce92   quay.io/ceph/daemon:v6.0.8-stable-6.0-pacific-centos-stream8   "/usr/bin/ceph-crash"    12 days ago   Up 12 days             ceph-crash-B-03-11-cephctl

Made sure my inventory, site-container.yml and all.yml reflects the new changes brought in by stable.6

Execute the runbook with ansible-playbook -i /opt/ceph-ansible/inventory -e 'ansible_python_interpreter=/usr/bin/python3' site-container.yml --limit=monitoring

Runbook fails with:

TASK [ceph-facts : set_fact _monitor_addresses to monitor_interface - ipv4] *****************************************************************************************
Tuesday 02 August 2022  09:11:14 +0200 (0:00:00.077)       0:02:18.001 ********
fatal: [B-03-11-cephctl.maas]: FAILED! =>
  msg: 'template error while templating string: No filter named ''ansible.utils.ipwrap''.. String: {{ _monitor_addresses | default([]) + [{ ''name'': item, ''addr'': hostvars[item][''ansible_facts''][(hostvars[item][''monitor_interface'']|replace(''-'', ''_''))][ip_version][''address''] | ansible.utils.ipwrap }]  }}'

NO MORE HOSTS LEFT **************************************************************************************************************************************************

PLAY RECAP **********************************************************************************************************************************************************
B-03-11-cephctl.maas       : ok=21   changed=1    unreachable=0    failed=1    skipped=37   rescued=0    ignored=0

What you expected to happen: That the runbook runs successfully and the alertmanager, grafana-server, prometheus and node-exporter runs on the monitoring host.

How to reproduce it (minimal and precise): git reset --hard origin/stable-6.0 Run site-container.yml, limited to the the monitoring host

Share your group_vars files, inventory and full ceph-ansibe log

Environment:

  • OS (e.g. from /etc/os-release): Ubuntu 20.04.4 LTS
  • Kernel (e.g. uname -a): Linux 5.4.0-122-generic
  • Docker version if applicable (e.g. docker version): 20.10.12
  • Ansible version (e.g. ansible-playbook --version): 2.9.27
  • ceph-ansible version (e.g. git head or tag or stable branch): stable-6.0
  • Ceph version (e.g. ceph -v): 16.2.10

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
guitscommented, Aug 3, 2022

fixed by #7262

0reactions
jeevadotnetcommented, Aug 3, 2022

Thanks master @guits it worked 💯

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting error template error while templating string: No filter ...
1 Answer 1 · Install the missing collection, when logged in with the problematic user: ansible-galaxy collection install community. · Install the ...
Read more >
No filter named ipaddr found · Issue #643 - GitHub
SUMMARY One of this collection's dependencies, ansible.netcommon ... {"msg": "template error while templating string: No filter named ...
Read more >
Bug #1963686 “AnsibleError: template error while templating ...
While running setup-hosts from stable/wallaby this error occurs :AnsibleError: template error while templating string: no filter named ...
Read more >
template error while templating string: no filter named 'failed'
I see the filter "failed" documented in Jinja2 here. Why is it not working? MY ENV: ansible --version ansible 2.10.7 config file =...
Read more >
Getting a 'ipaddr' template error when running ansible script ...
template error while templating string : no filter named 'ipaddr'. How did you install ansible? What version of ansible is installed?
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found