ansibleguy / collection_opnsense

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

Feature: API-usage refactoring #51

Open ansibleguy opened 8 months ago

ansibleguy commented 8 months ago

Link to API

-

Description

The /get API endpoints will change in a major way in the future - as described in this OPNSense issue. We will have to refactor our existing API implementation: OPNSense API usage

This should be implemented as abstracted/shared logic: https://opnsense.ansibleguy.net/en/latest/usage/4_develop.html#abstraction

enmanuelmoreira commented 8 months ago

Hi Jeef, I have a question, It will support aliases and port range on firewall rules in the next collection release?

ansibleguy commented 8 months ago

@enmanuelmoreira Greetings! I don't think that the OPNSense 'Firewall-Automation-Filter' Rules (API manageable ones) do yet support those.. :/

You can check it yourself in the WebUI: https://<FIREWALL>/ui/firewall/filter/ image

If you find that something is configurable in the web-ui 'Automation-Rules' but not using the ansible-module(s) - I can check it!

enmanuelmoreira commented 8 months ago

Grettings @ansibleguy!

I have a couple of aliases to allow multiple ports, in my example email ports image

Then, when I tried to apply them to a rule it worked:

image

It would be awesome if via Ansible could configure aliases and apply later on rules (it will simplify a ton of code)