Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ansible and Fedora23 - "firewalld required for this module"

I'm trying to set up my firewalld through Ansible on my Fedora 23 server from my Fedora client (Yes I like fedora :D ).

However, each time I try to execute a playbook with some commands including firewalld (Example - firewalld: service=https permanent=true state=enabled), the playbook execution fail with the following message :

failed: [w.x.y.z] => {"failed": true, "parsed": false}
failed=True msg='firewalld required for this module'

I have firewalld up and running on the remote server :

# firewall-cmd --version
0.3.14.2

On my computer :

$ ansible --version
ansible 1.9.4
configured module search path = None

Does anyone know where it could come from ? Thank you !

--

EDIT: At this line in Ansible source code, firewall library seems not to be imported (and execute error which display that there is no firewall). However, this library exists in Python3 and not Python2 which is used by Ansible.

$ locate firewall
[...]
/usr/lib/python3.4/site-packages/firewall
[...]

I will continue to search, but if someone has an idea...

like image 267
Lerenn Avatar asked Nov 24 '15 22:11

Lerenn


1 Answers

I found the explanation and solution :

Following my edit, I installed python-firewall which is python 2 bindings of firewalld. But, the execution was incorrect because of the absence of cockpit. So I had to install cockpit too...

Long story, short story, this is what I've done on remote machine :

# dnf install python-firewall cockpit -y 
like image 62
Lerenn Avatar answered Nov 07 '22 20:11

Lerenn