-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
I found error on task Gather the package facts:
- name: Gather the package facts
ansible.builtin.package_facts:
manager: autosometimes it will causing error because of dependencies is missing:
fatal: [ansible-inventory]: FAILED! => {"changed": false, "msg": "Could not detect a supported package manager from the following list: ['portage', 'pkg', 'pacman', 'apt', 'rpm', 'pkg_info', 'apk'], or the required Python library is not installed. Check warnings for details."}To minimalize changes, I propose solution to adding validation to install dependencies by specific OS family before task Gather the package facts:
# Install dependencies on OS family ['RedHat' | 'Debian' | 'Archlinux']
- ansible.builtin.include_tasks: deps-{{ ansible_os_family }}.yml
when: ansible_os_family in ['RedHat', 'Debian', 'Archlinux']
- name: Gather the package facts
ansible.builtin.package_facts:
manager: autodeps-Debian.yml
---
- name: Install prerequisite packages
ansible.builtin.apt:
name: "{{ dependency_packages }}"
state: presentdeps-RedHat.yml
- name: Install prerequisite packages
ansible.builtin.package:
name: "{{ dependency_packages }}"
state: presentdependency_packages set in file inside folder vars per OS family. All changes will adding new task below:

Metadata
Metadata
Assignees
Labels
No labels