OK, found an open issue on this
https://github.com/ansible/ansible/issues/55570
On Monday, 27 May 2019 10:49:28 UTC+1, Patrick Tuite wrote:
>
> Hi folks
>
> We have a filter working up till v2.7
>
> "{{ v_overlay_network | ipaddr('net') | ipaddr('191') | ipaddr('address')
> if v_overlay_network is defined and v_overlay_network | ipaddr else
> 198.19.0.191 }}"
>
> In this case *v_overlay_network* is defined (198.19.0.0/16)
> Now alway produces *False* in v2.8
>
> I think I've isolated it to the ipaddr integer host query, where positive
> integers return nothing, but negative integers work as expected
>
> TASK [DEBUG print positive v_overlay_network msg={{ v_overlay_network |
> ipaddr('net') | ipaddr('254') }}] *****************************
> ok: [localhost] => {
> "msg": ""
> }
>
> TASK [DEBUG print negative v_overlay_network msg={{ v_overlay_network |
> ipaddr('net') | ipaddr('-64') }}] *****************************
> ok: [localhost] => {
> "msg": "198.19.255.192/16"
> }
>
> Not sure if I missed something in the Porting Guide or if I have hit a bug?
>
> $ python --version
>> Python 2.7.5
>
>
> $ pip show ansible
>> ---
>> Metadata-Version: 2.1
>> Name: ansible
>> Version: 2.8.0
>
>
>
>>
>
> $ pip show jinja2
>
> ---
>
> Metadata-Version: 2.1
>
> Name: Jinja2
>
> Version: 2.10.1
>
>
> Thanks
> Patrick
>
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/4b25adab-0ba7-4000-b18a-e87af0f3cd6a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.