Closed
Description
SUMMARY
One of this collection's dependencies, ansible.netcommon
recently upgraded to 2.6.0. With this version of the collection we can no longer use the ipaddr
filter. Instead we must used the namespaced version of this filter: ansible.netcommon.ipaddr
.
ISSUE TYPE
- Bug Report
COMPONENT NAME
zabbix-agent role
ANSIBLE VERSION
bash-5.1# ansible --version
ansible [core 2.11.7]
config file = None
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3.9/site-packages/ansible
ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/bin/ansible
python version = 3.9.7 (default, Nov 24 2021, 21:15:59) [GCC 10.3.1 20211027]
jinja version = 3.0.3
libyaml = False
CONFIGURATION
OS / ENVIRONMENT / Zabbix Version
STEPS TO REPRODUCE
requirements.yml
---
collections:
- name: git+https://github.com/ansible-collections/community.zabbix.git
type: git
ansible playbook:
---
- name: test
hosts: all
gather_facts: false
vars:
ansible_port: 2222
tasks:
- debug:
msg: "{{ '127.0.0.1' | ipaddr }}"
- raw: "echo {{ '127.0.0.1' | ipaddr }} > /tmp/test"
- template:
src: template
dest: /tmp/template
Template:
{{ '127.0.0.1' | ipaddr }}
EXPECTED RESULTS
I expected the ansible command to work
ACTUAL RESULTS
PLAY [test] ***************************************************************************************************************************************************************************
TASK [debug] **************************************************************************************************************************************************************************
fatal: [172.17.0.4]: FAILED! => {"msg": "template error while templating string: No filter named 'ipaddr'.. String: {{ '127.0.0.1' | ipaddr }}"}
PLAY RECAP ****************************************************************************************************************************************************************************
172.17.0.4 : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
Metadata
Metadata
Assignees
Labels
No labels