Actions
Review #712
closedFix 'ipaddr' Jinja filter usage and avoid a fork
Start date:
2020-08-28
Branch:
fix_ipaddr_usage
Description
fix_ipaddr_usage
branch from duckcorp-infra
repository.
Use address
parameter with hosts and network
parameter with ranges.
ipaddr
Jinja filter behavior is quiet unexpected but a fork of this filter isn't required.
Tested with the following play and command:
- hosts: all
tasks:
- debug:
msg: "{{ item ~ ' : ' ~ (item|ipaddr('address') or item|ipaddr('network')) ~ '/' ~ item|ipaddr('netmask') }}"
loop: '{{ firewalling.whitelist }}'
$ ansible-playbook -c local -l Elwing test.yaml
The playbook output is the same with these ipaddr versions:
- the one committed
- ansible/ansible: branch stable-2.9
- ansible-collections/ansible.netcommon
Relates: #646
Updated by Marc Dequènes over 4 years ago
- Status changed from In Progress to Resolved
Sorry it took so long. I think I looked at it but was really tired and did not understand well. I've been a bit off these days but I looked again today. That's really clever and I'm happy to finally remove this fork.
Actions