PaloAltoNetworks / ansible-pan

Ansible modules for Palo Alto Networks NGFWs
Other
229 stars 161 forks source link

panos_interface: mode aggregate-group does not work #421

Closed odysseus107 closed 5 years ago

odysseus107 commented 5 years ago

failed: [paloalto] (item={u'if_name': u'ethernet1/1', u'description': u'AE1 for purpose xy', u'aggregate_group': u'ae1', u'mode': u'aggregate-group'}) => {"ansible_loop_var": "item", "changed": false, "item": {"aggregate_group": "ae1", "description": "AE1 for purpose xy", "mode": "aggregate-group", "if_name": "ethernet1/1"}, "msg": "Failed setref: interface 'ethernet1/1' is not a valid reference"}

I think the parameters are set fine. The error should not appear, right?

odysseus107 commented 5 years ago

I think the problem is that the libraries try to add the interface ethernet1/1 to the default router which makes no sense. The aggregate interface (e.g. "ae1" needs to be listed there and that is no task of this module?!?

Basically, the changes on the ethernet1/1 interface are done correctly (according to config monitoring on PA device):

succeed on /config/devices/entry[@name='localhost.localdomain']/network/interface/ethernet/entry[@name='ethernet1/1']

failed on: /config/devices/entry[@name='localhost.localdomain']/network/virtual-router/entry[@name='default']/interface

And that is why the module throws an error in the end...

shinmog commented 5 years ago

Fixed by PaloAltoNetworks/pandevice#174 - thanks @odysseus107 :)