ansibleguy / collection_opnsense

Ansible Collection to manage OPNSense firewalls using their API
https://opnsense.ansibleguy.net
GNU General Public License v3.0
254 stars 34 forks source link

Problem: interface_vip error 'A network address is required' #34

Closed rostchri closed 10 months ago

rostchri commented 10 months ago

Modules

ansibleguy.opnsense.interface_vip

Version

1.2.7

Ansible Version

2.14.2

OPNSense Version

23.7.8_1

OPNSense-Plugin Version

os-firewall: 1.4_2

Issue

I'm using the following ansible task:

and got the response 'A network address is required.' I think address and cidr should be enough to get this ip-alias working.

Config Ansible

[defaults] callback_plugins= ./callbacks stdout_callback = anstomlog retry_files_enabled = False collections_paths = collections

Config OPNSense

root@OPNsense:~ # ifconfig wan

wan: flags=8863<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 description: WAN (wan) options=80028<VLAN_MTU,JUMBO_MTU,LINKSTATE> ether 0c:70:51:ec:00:01 inet6 fe80::e70:51ff:feec:1%wan prefixlen 64 scopeid 0x2 inet xyz.178.77.173 netmask 0xffffffe0 broadcast xyz.178.77.191 media: Ethernet autoselect (10Gbase-T ) status: active nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>

Debug Output

vhpfwnat-gns3-01` | FAILED | 826ms {

Profiling Output

No response

ansibleguy commented 10 months ago

Related to: https://github.com/opnsense/core/issues/7041

fichtner commented 10 months ago

Automatically adding /32 or /128 to the address is no longer supported in 23.7.9. These subnet sizes are also likely wrong to begin with. This works as intended now.

ansibleguy commented 10 months ago

@rostchri The issue should be fixed in the latest version:

ansible-galaxy collection install git+https://github.com/ansibleguy/collection_opnsense.git

Thank you for opening the issue!

ansibleguy commented 10 months ago

Also related: https://github.com/ansibleguy/collection_opnsense/commit/3a824c29df3720de7a30d8087ace266ca9707716