Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No 'firewalld' on Rocky9 #12

Open
dominikl opened this issue Mar 7, 2024 · 1 comment
Open

No 'firewalld' on Rocky9 #12

dominikl opened this issue Mar 7, 2024 · 1 comment

Comments

@dominikl
Copy link
Member

dominikl commented Mar 7, 2024

It looks like firewalld is not installed on Rocky9, so this section causes an issue:
https://github.com/ome/ansible-role-iptables-raw/blob/master/tasks/main.yml#L15

TASK [ome.iptables_raw : iptables-raw | disable firewalld] **********************************************************************************************************************
fatal: [2f5d1f82-2aad-433b-ab9f-98c5fe25ffa5]: FAILED! => {"changed": false, "msg": "Could not find the requested service firewalld: host"}

Is it possible to have some kind of soft fail here if the service is not installed, instead of a fatal error?

@sbesson
Copy link
Member

sbesson commented Mar 8, 2024

Adding

- name: iptables-raw | print service facts
  become: true
  debug:
    var: ansible_facts.services

to the role yields

        "firewalld.service": {
            "name": "firewalld.service",
            "source": "systemd",
            "state": "stopped",
            "status": "not-found"
        },    

so the assumption that you can rely on the list of returned services is not sufficient and more is needed.
An alternative workflow (suggested here) would be to ignore the failure is "Could not find the requested service" is returned in the message.

For IDR, a workaround might be to set iptables_raw_disable_firewalld: False as firewalld is not installed by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants