So I'm connecting with ansible to an interconnect device running PicOS8. I'm issuing a command which has the following output:
10.240.18.20,fe80::a94:efff:fe50:b516%eth0
fe80::a94:efff:fe71:d996%vlan.4,10.240.23.34
fe80::a94:efff:fe71:daa6%vlan.4,10.240.23.
This is not always standard since sometimes, the ipv4 address preceeds the ipv6 or at times there is no ipv6 at all.
I'm registering this output using ansible register, let's say as smm_output.
Then I want to display the output, showing only the ipv4 ip addresses (with the playbook bellow):
- debug:
msg: "{{ smm_output.stdout_lines | ipv4('address') }}"
but the output is blank. Not sure what I'm doing wrong here or how to strictly show the ipv4 ip addresses from that output.