This is probably an easy fix, but I'm not finding anything with my google-fu. Maybe pulling the wrong part of the error... Anyway, trying to just set a simple firewalld rule for inbound http.
This looks like some sort of permissions issue with the become
?
I've set SELinux to permissive and found that this issue is still occurring, so I don't believe it to be SELinux related.
Servers
All systems are running Fedora 34, fully updated. All machines also have the python3-firewall package installed.
- Primary FreeIPA Server, (10.1.0.11)
- Secondary FreeIAP Server (10.1.0.12)
- Ansible Server (10.1.0.22)
Trying to run...
[brandonyoung@ansible01 ansible-lab01]$ ansible-playbook -K -i hosts.yml playbooks/testFirewalld.yml
BECOME password:
PLAY [IPAServers] *****************************************************************************
TASK [Gathering Facts] ************************************************************************
ok: [10.1.0.12]
ok: [10.1.0.11]
TASK [Ensure that HTTP is allowed through the firewall] ***************************************
ERROR:dbus.proxies:Introspect error on :1.6:/org/fedoraproject/FirewallD1: dbus.exceptions.DBusException: org.fedoraproject.slip.dbus.service.PolKit.NotAuthorizedException.org.fedoraproject.FirewallD1.info:
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: dbus.exceptions.DBusException: org.fedoraproject.slip.dbus.service.PolKit.NotAuthorizedException.org.fedoraproject.FirewallD1.info:
fatal: [10.1.0.11]: FAILED! => {"msg": "Unexpected failure during module execution.", "stdout": ""}
ERROR:dbus.proxies:Introspect error on :1.6:/org/fedoraproject/FirewallD1: dbus.exceptions.DBusException: org.fedoraproject.slip.dbus.service.PolKit.NotAuthorizedException.org.fedoraproject.FirewallD1.info:
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: dbus.exceptions.DBusException: org.fedoraproject.slip.dbus.service.PolKit.NotAuthorizedException.org.fedoraproject.FirewallD1.info:
fatal: [10.1.0.12]: FAILED! => {"msg": "Unexpected failure during module execution.", "stdout": ""}
PLAY RECAP ************************************************************************************
10.1.0.11 : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
10.1.0.12 : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
Configuration
hosts.yml
unitedStates:
children:
city:
children:
ansibleServers:
hosts:
10.1.0.22:
IPAServers:
hosts:
10.1.0.11:
10.1.0.12:
vars:
ntp_server: time.nist.gov
ansible_python_interpreter: /usr/bin/python3
playbooks/testFirewalld.yml
---
# This playbook will test some basic firewall rule enforcement using `ansible.posix.firewalld`
- hosts: IPAServers
tasks:
- name: Ensure that HTTP is allowed through the firewall
ansible.posix.firewalld:
service: http
immediate: yes
permanent: yes
state: enabled
become: yes
Output of ansible-playbook -K -i hosts.yml playbooks/testFirewalld.yml -vvv
here: https://pastebin.com/ceskr5wJ