-
Notifications
You must be signed in to change notification settings - Fork 153
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
firewalld task is not idempotent for adding ports #179
Comments
@okapia Thanks for reporting this issue. Could you please report the I am able to reproduce this on
and not on
|
needs_info |
I had the issue with 0.8.2-2.0.1.el8. The machine has been upgraded from 8.3 to 8.4 just last week so now runs 0.8.2-6.0.1.el8. But I just checked again and I still see the issue. I don't know if there's anything Oracle Linux specific in those version numbers like the additional |
Use APIs like ``query*`` instead of ``get*``. Fixes: ansible-collections#179 Signed-off-by: Abhijeet Kasurde <[email protected]>
As this is a regression, it should really be backported also to Ansible 2.9.z |
@mwperina module works after downgrading to Firewalld 0.8.2. also, Ansible 2.9 release is frozen and only open for critical security fixes. |
Use APIs like ``query*`` instead of ``get*``. Fixes: ansible-collections#179 Signed-off-by: Abhijeet Kasurde <[email protected]>
Use APIs like ``query*`` instead of ``get*``. Fixes: ansible-collections#179 Signed-off-by: Abhijeet Kasurde <[email protected]>
Use APIs like ``query*`` instead of ``get*``. Fixes: ansible-collections#179 Signed-off-by: Abhijeet Kasurde <[email protected]>
Fixes: ansible-collections/ansible.posix#179 Signed-off-by: Abhijeet Kasurde <[email protected]>
Fixes: ansible-collections/ansible.posix#179 Signed-off-by: Abhijeet Kasurde <[email protected]>
When running an apply via flight profile for multiple nodes, the playbook ends up getting a bit confused with all the add MAC -> reload loops going at once. To circurmvent this I've tweaked it to add all MACs permanently to firewall then do a reload. This seems to reduce the likelihood of an error occuring. Relevant link - ansible-collections/ansible.posix#179
SUMMARY
I'm using the firewalld: task with the port: option. The first time this is run on a host, it works fine. However on any later or subsequent runs, I get an error: ERROR: Exception caught: org.fedoraproject.FirewallD1.Exception: ALREADY_ENABLED: 'xxxxx:tcp' already in 'public' Permanent and Non-Permanent(immediate) operation
This violates idempotency which is really the whole point of ansible.
Aside from port:, I'm using permanent: yes, immediate: yes, state: enabled, and zone: public.
ISSUE TYPE
COMPONENT NAME
ansible.posix.firewalld
ANSIBLE VERSION
CONFIGURATION
Problem verified from a plain pip install ansible in a venv and just the minimal task so with zero config. Otherwise I'm not permitted to publish internal paths on the Internet so no full dump.
OS / ENVIRONMENT
Oracle Linux 8.3 which is a RHEL 8 clone.
STEPS TO REPRODUCE
And run this TWICE
EXPECTED RESULTS
Expected results of the second run to be changed: false, failed: false
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: