k3s-io / k3s-ansible

Apache License 2.0
1.98k stars 796 forks source link

Error running against Armbian on SOPine64 #354

Closed strophy closed 3 weeks ago

strophy commented 3 weeks ago

I have a fairly old SOPine Clusterboard with three SOPine A64 boards installed running Armbian community 24.8.0. I get this error during the run:

TASK [k3s.orchestration.prereq : Gather the package facts] ********************************************************************************************
[WARNING]: Found "apt" but Failed to import the required Python library (apt) on pine64so'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
fatal: [10.0.0.168]: FAILED! => changed=false 
  msg: 'Could not detect a supported package manager from the following list: [''portage'', ''apt'', ''pkg_info'', ''apk'', ''pacman'', ''pkg'', ''rpm''], or the required Python library is not installed. Check warnings for details.'
fatal: [10.0.0.125]: FAILED! => changed=false 
  msg: 'Could not detect a supported package manager from the following list: [''pacman'', ''apk'', ''apt'', ''rpm'', ''pkg_info'', ''pkg'', ''portage''], or the required Python library is not installed. Check warnings for details.'
fatal: [10.0.0.44]: FAILED! => changed=false 
  msg: 'Could not detect a supported package manager from the following list: [''pacman'', ''apk'', ''rpm'', ''pkg_info'', ''pkg'', ''apt'', ''portage''], or the required Python library is not installed. Check warnings for details.'

I was able to resolve it by running sudo apt install python3-apt on each board in the inventory. Is this a check that could/should be included in the playbook?

dereknola commented 3 weeks ago

Given that this is a niche setup, I don't see a reason to add it to the playbooks. We do not intend to cover every setup imaginable with this playbook, a user modifying the playbook to fit their local needs is expected.