firewall icon indicating copy to clipboard operation
firewall copied to clipboard

Add `includes` when defining a custom service

Open skwde opened this issue 10 months ago • 1 comments

What would you like to be added:

Allow for includes when defining a custom service (https://firewalld.org/documentation/man-pages/firewalld.service.html), e.g.

        - name: Run firewall role
          ansible.builtin.include_role:
            name: fedora.linux_system_roles.firewall
          vars:
            firewall_disable_conflicting_services: true
            firewall:
              - service: custom
                short: Custom
                description: Custom service
                port: 2222/tcp
                includes: [http, https]
                state: present
                permanent: true

Currently includes are silently ignored.

An example is e.g. the predefined firewalld service freeipa-4 (https://github.com/firewalld/firewalld/blob/main/config/services/freeipa-4.xml)

Why is this needed:

This makes firewalld services more explicit and easier / quicker to read when there are many non-standard ports.

skwde avatar Feb 17 '25 14:02 skwde

@skwde can you try https://github.com/linux-system-roles/firewall/pull/259 ?

richm avatar Apr 11 '25 20:04 richm