AnsibleError: template error while templating string: no filter named 'ipaddr'

Bug #1963686 reported by Peter Struys
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openstack-ansible
Fix Released
Critical
Unassigned

Bug Description

While running setup-hosts from stable/wallaby this error occurs :AnsibleError: template error while templating string: no filter named 'ipaddr'

Apparantly in version 2.6 of ansible netcommon the filter ipaddr was move to ansible utils.

Old location on working deploy server in production environment which has ansible netcommon version 2.1: /etc/ansible/ansible_collections/ansible/netcommon/plugins/filter/ipaddr.py

New location on test deploy server which has ansible netcommon version 2.6 : /etc/ansible/ansible_collections/ansible/utils/plugins/filter/ipaddr.py

See also : https://github.com/ansible-collections/ansible.netcommon/pull/359

Revision history for this message
Peter Struys (peterstruys) wrote :

From : https://galaxy.ansible.com/search?deprecated=false&keywords=netcommon&order_by=-relevance&page=1

netcommon : Ansible Collection with common content to help automate the management of network, security, and cloud devices.

Current Version: 2.6.0 uploaded 2 days ago (this line written on 4th of March).

Revision history for this message
Dmitriy Rabotyagov (noonedeadpunk) wrote :

Hi Peter

We aware of the issue and already pushed https://review.opendev.org/c/openstack/openstack-ansible/+/831536 to cover that

Fix is merged for stable/wallaby and stable/victoria. We will release new version as soon as land fix for Xena.

In the meanwhile, I can suggest you workaround. You can create file /etc/openstack_deploy/user-collection-requirements.yml with content:

---
collections:
  - name: https://github.com/ansible-collections/ansible.netcommon
    version: 2.5.1
    type: git

And re-run scripts/bootstrap-ansible.sh to pull in collection version

Changed in openstack-ansible:
status: New → Fix Committed
Changed in openstack-ansible:
importance: Undecided → Critical
Revision history for this message
Peter Struys (peterstruys) wrote :

Great. Thx for the prompt reply.

I manually downloaded and installed netcommon 2.5.1 but your suggestion is more elegant. The playbook setup-hosts now runs with succes.

regards
Peter

Revision history for this message
Dmitriy Rabotyagov (noonedeadpunk) wrote :

Fixes have been released with 22.4.2 for Victoria, 23.2.2 for Wallaby and 24.1.0 for Xena

Changed in openstack-ansible:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers