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

Firewall related error while trying to run playbook #26

Open
rrbanda opened this issue May 8, 2023 · 3 comments
Open

Firewall related error while trying to run playbook #26

rrbanda opened this issue May 8, 2023 · 3 comments

Comments

@rrbanda
Copy link

rrbanda commented May 8, 2023

TASK [Open Ports in firewalld] ************************************************************************************************************************************************************************************************************************************************************************************
failed: [127.0.0.1] (item=8000/tcp) => {"ansible_loop_var": "item", "changed": false, "item": "8000/tcp", "msg": "Failed to import the required Python library (firewall) on localhost.localdomain's Python /usr/bin/python3.11. Please read the module documentation and install it in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter. Version 0.2.11 or newer required (0.3.9 or newer for offline operations)"}
failed: [127.0.0.1] (item=9000/tcp) => {"ansible_loop_var": "item", "changed": false, "item": "9000/tcp", "msg": "Failed to import the required Python library (firewall) on localhost.localdomain's Python /usr/bin/python3.11. Please read the module documentation and install it in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter. Version 0.2.11 or newer required (0.3.9 or newer for offline operations)"}

@rrbanda
Copy link
Author

rrbanda commented May 8, 2023

ansible --version
ansible [core 2.14.2]
  config file = /home/centos9/quadlet-demo/ansible.cfg
  configured module search path = ['/home/centos9/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.11/site-packages/ansible
  ansible collection location = /home/centos9/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.11.2 (main, Feb 16 2023, 00:00:00) [GCC 11.3.1 20221121 (Red Hat 11.3.1-4)] (/usr/bin/python3.11)
  jinja version = 3.1.2
  libyaml = True
podman -v
podman version 4.4.1

@rrbanda
Copy link
Author

rrbanda commented May 8, 2023

Updated the playbook task like below to run locally

- name: Setup quadlet demo machine
  hosts: 127.0.0.1
  connection: local
  become: true

@ygalblum
Copy link
Owner

ygalblum commented May 9, 2023

It seems that the playbook found that firewalld is running and therefore wanted to open the required ports. But, according to the error message, the required python package is not installed.

This is kinda strange because when I tried to install firewalld I saw that python3-firewall is installed as a dependency. We could update the playbook to install it, but not sure this is in fact the issue.

Can you please check if firewalld is in fact running: systemctl status firewalld?
Can you please check if the package is installed: rpm -qa | grep firewall | grep python?

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