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

Ara plugin doesn't work on Ubuntu22.04 #487

Open
kemopq opened this issue May 9, 2023 · 3 comments
Open

Ara plugin doesn't work on Ubuntu22.04 #487

kemopq opened this issue May 9, 2023 · 3 comments

Comments

@kemopq
Copy link

kemopq commented May 9, 2023

What is the issue ?

I installed ara according to instructions in https://ara.recordsansible.org/ (with an api server). When I run ansible playbook, the callback function failed. I got the warning:
[WARNING]: Skipping callback 'ara_default', unable to load due to: The 'ansible_base' distribution was not found and is required by the application

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.2 LTS
Release: 22.04
Codename: jammy

$ python3 --version
Python 3.10.6

$ ansible --version
ansible [core 2.14.5]
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/kpog/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3/dist-packages/ansible
ansible collection location = /home/kpog/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/local/bin/ansible
python version = 3.10.6 (main, Mar 10 2023, 10:55:28) [GCC 11.3.0] (/usr/bin/python3)
jinja version = 3.0.3
libyaml = True

$ ara --version
ara 1.6.1

I made the same procedure on Ubuntu 20.04 and it works without any problems.

$ lsb_release -a
LSB Version: core-11.1.0ubuntu2-noarch:security-11.1.0ubuntu2-noarch
Distributor ID: Ubuntu
Description: Ubuntu 20.04.5 LTS
Release: 20.04
Codename: focal

$ python3 --version
Python 3.8.10

$ ansible --version
ansible [core 2.12.10]
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/ansible/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3/dist-packages/ansible
ansible collection location = /home/ansible/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/bin/ansible
python version = 3.8.10 (default, Mar 13 2023, 10:26:41) [GCC 9.4.0]
jinja version = 2.10.1
libyaml = True

$ ara --version
ara 1.6.1

What should be happening ?

It should work on Ubuntu22.04 the same as on Ubuntu20.04

@dmsimard
Copy link
Contributor

dmsimard commented May 9, 2023

Hey @kemopq and thanks for the issue.

At first glance, my understanding is that ansible was installed from Ubuntu's distribution packages (maybe from the Ubuntu Ansible PPA? I'm not sure) whereas ara would've been installed manually using pip.

If this is the case, it's possible you are running into issues caused by mixing python packages from the distribution (apt) and from pypi which can lead to a range of various different problems.

Could you confirm how you've installed both ara and ansible ?

Could you try reproducing the issue by installing both ansible and ara from PyPI ?
You can do this in a virtual environment like this:

python3 -m venv ~/virtualenv
source ~/virtualenv/bin/activate
pip install ansible ara
export ANSIBLE_CALLBACK_PLUGINS=$(python3 -m ara.setup.callback_plugins)
ansible-playbook <path/to/your/playbook.yml>

@kemopq
Copy link
Author

kemopq commented May 10, 2023

You are right. The ansible is installed from Ubuntu Ansible ppa with apt as described in official ansible documentation. Using pip for installation of ansible solved the problem described above.
But still do you have any hint how to repair my original problem, as in our company official way to install ansible is by apt?
Thanks!

@dmsimard
Copy link
Contributor

Hi,

I don't deploy to Ubuntu or Debian under your constraints so I don't have great suggestions but there is a debian package for ara maintained by the community though it isn't the latest version: https://tracker.debian.org/pkg/python-ara

I am not aware if there is a package for Ubuntu.

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