### Summary

fedora-minimal:38 minimal containers only contain microdnf which now points to dnf5. See https://fedoraproject.org/wiki/Changes/MajorUpgradeOfMicrodnf. The package manager discovery code added https://github.com/ansible/ansible/pull/80272/ only selects dnf5 on Fedora >= 39 and doesn't consider it otherwise. In the fedora-minimal:38 container, `ansible_pkg_manager` is set to `unknown` when it should be set to `dnf5`.

Package manager discovery should **prefer** dnf5 on Fedora 39, but it shouldn't ignore dnf4 on Fedora >= 39 if dnf5 is missing (users can exclude dnf5 from their systems if they'd like), and it shouldn't ignore dnf5 on Fedora < 39 when dnf4 is missing (the fedora-minimal:38 container is one example of where this assumption breaks).

### Issue Type

Bug Report

### Component Name

dnf5
lib/ansible/module_utils/facts/system/pkg_mgr.py

### Ansible Version

```console
$ ansible --version
ansible [core 2.15.0.dev0]
  config file = None
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /root/venv/lib64/python3.11/site-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable l\ocation = ./venv/bin/ansible
  python version = 3.11.2 (main, Feb  8 2023, 00:00:00) [GCC 13.0.1 20230208 (Red Hat 13.0.1-0)] (/root/venv/bin/python3)
  jinja version = 3.1.2
  libyaml = True
```


### Configuration

```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
CONFIG_FILE() = None
```


### OS / Environment

Fedora 38 instance with dnf5 but not dnf

### Steps to Reproduce

<!--- Paste example playbooks or commands between quotes below -->
```Dockerfile
# fedora-minimal only has microdnf, which has been replaced by dnf5
FROM registry.fedoraproject.org/fedora-minimal:38

WORKDIR /root

RUN dnf5 install -qy python3 python3-libdnf5

RUN python3 -m venv venv && \
    ./venv/bin/pip install 'https://github.com/ansible/ansible/archive/devel.tar.gz'

RUN ./venv/bin/ansible --version

RUN ./venv/bin/ansible-config dump --only-changed -t all

RUN ./venv/bin/ansible -i localhost -c local localhost -m setup | grep pkg

RUN ./venv/bin/ansible -i localhost -c local localhost -m package -a name=zsh
```


### Expected Results

I expect ansible to determine that `ansible_pkg_manager` is dnf5 and use it as the backend for the `package` module.

### Actual Results

<details>
<summary>Logs</summary>

```console
$ buildah bud --squash
STEP 1/8: FROM registry.fedoraproject.org/fedora-minimal:38
STEP 2/8: WORKDIR /root
STEP 3/8: RUN dnf5 install -qy python3 python3-libdnf5
Package                       Arch   Version         Repository      Size
Installing:                                                              
 python3                      x86_64 3.11.2-1.fc38   fedora      33.0 KiB
 python3-libdnf5              x86_64 5.0.6-2.fc38    fedora       5.4 MiB
Installing dependencies:                                                 
 expat                        x86_64 2.5.0-2.fc38    fedora     276.0 KiB
 libb2                        x86_64 0.98.1-8.fc38   fedora      42.6 KiB
 libgomp                      x86_64 13.0.1-0.8.fc38 fedora     481.7 KiB
 libnsl2                      x86_64 2.0.0-5.fc38    fedora      58.3 KiB
 libtirpc                     x86_64 1.3.3-1.fc38    fedora     203.6 KiB
 mpdecimal                    x86_64 2.5.1-6.fc38    fedora     202.2 KiB
 python-pip-wheel             noarch 22.3.1-2.fc38   fedora       1.5 MiB
 python-setuptools-wheel      noarch 65.5.1-2.fc38   fedora     860.3 KiB
 python3-libs                 x86_64 3.11.2-1.fc38   fedora      44.2 MiB
Installing weak dependencies:                                            
 libxcrypt-compat             x86_64 4.4.33-7.fc38   fedora     198.3 KiB
 python-unversioned-command   noarch 3.11.2-1.fc38   fedora      23.0   B

Transaction Summary:
 Installing:       13 packages

Downloading Packages:
[ 1/13] expat-0:2.5.0-2.fc38.x86_64     100% | 307.8 KiB/s | 110.2 KiB |  00m00s
[ 2/13] libb2-0:0.98.1-8.fc38.x86_64    100% | 240.5 KiB/s |  25.5 KiB |  00m00s
[ 3/13] libnsl2-0:2.0.0-5.fc38.x86_64   100% | 763.9 KiB/s |  29.8 KiB |  00m00s
[ 4/13] python3-libdnf5-0:5.0.6-2.fc38. 100% |   2.0 MiB/s |   1.0 MiB |  00m01s
[ 5/13] mpdecimal-0:2.5.1-6.fc38.x86_64 100% |   1.7 MiB/s |  88.8 KiB |  00m00s
[ 6/13] libtirpc-0:1.3.3-1.fc38.x86_64  100% |   1.4 MiB/s |  93.8 KiB |  00m00s
[ 7/13] python-pip-wheel-0:22.3.1-2.fc3 100% |   6.6 MiB/s |   1.4 MiB |  00m00s
[ 8/13] python3-0:3.11.2-1.fc38.x86_64  100% | 441.9 KiB/s |  27.8 KiB |  00m00s
[ 9/13] python-setuptools-wheel-0:65.5. 100% |   2.1 MiB/s | 715.0 KiB |  00m00s
[10/13] libgomp-0:13.0.1-0.8.fc38.x86_6 100% |   4.0 MiB/s | 309.9 KiB |  00m00s
[11/13] libxcrypt-compat-0:4.4.33-7.fc3 100% |   1.0 MiB/s |  91.4 KiB |  00m00s
[12/13] python-unversioned-command-0:3. 100% |  85.2 KiB/s |  10.8 KiB |  00m00s
[13/13] python3-libs-0:3.11.2-1.fc38.x8 100% |   4.4 MiB/s |   9.6 MiB |  00m02s
--------------------------------------------------------------------------------
[13/13] Total                           100% |   5.4 MiB/s |  13.5 MiB |  00m03s

Verifying PGP signatures

Running transaction
[1/2] Verify package files              100% | 111.0   B/s |  13.0   B |  00m00s
[2/3] Prepare transaction               100% | 232.0   B/s |  13.0   B |  00m00s
[3/4] Installing libtirpc-0:1.3.3-1.fc3 100% |  50.2 MiB/s | 205.4 KiB |  00m00s
[4/5] Installing libnsl2-0:2.0.0-5.fc38 100% |  29.0 MiB/s |  59.4 KiB |  00m00s
[5/6] Installing libxcrypt-compat-0:4.4 100% |  65.0 MiB/s | 199.7 KiB |  00m00s
[6/7] Installing python-pip-wheel-0:22. 100% | 209.7 MiB/s |   1.5 MiB |  00m00s
[7/8] Installing libgomp-0:13.0.1-0.8.f 100% | 117.9 MiB/s | 483.1 KiB |  00m00s
[8/9] Installing libb2-0:0.98.1-8.fc38. 100% |  21.3 MiB/s |  43.7 KiB |  00m00s
[ 9/10] Installing python-setuptools-wh 100% | 210.2 MiB/s | 861.0 KiB |  00m00s
[10/11] Installing mpdecimal-0:2.5.1-6. 100% |  66.2 MiB/s | 203.3 KiB |  00m00s
[11/12] Installing expat-0:2.5.0-2.fc38 100% |  67.9 MiB/s | 278.1 KiB |  00m00s
[12/13] Installing python-unversioned-c 100% | 414.1 KiB/s | 424.0   B |  00m00s
[13/14] Installing python3-0:3.11.2-1.f 100% |   3.8 MiB/s |  34.8 KiB |  00m00s
[14/15] Installing python3-libs-0:3.11. 100% | 104.1 MiB/s |  44.6 MiB |  00m00s
[15/15] Installing python3-libdnf5-0:5. 100% | 100.6 MiB/s |   5.4 MiB |  00m00s
>>> Running trigger-install scriptlet: glibc-common-0:2.37-1.fc38.x86_64
>>> Stop trigger-install scriptlet: glibc-common-0:2.37-1.fc38.x86_64
--------------------------------------------------------------------------------
[15/15] Total                           100% |  57.7 MiB/s |  53.9 MiB |  00m01sSTEP 4/8: RUN python3 -m venv venv &&     ./venv/bin/pip install 'https://github.com/ansible/ansible/archive/devel.tar.gz'
Collecting https://github.com/ansible/ansible/archive/devel.tar.gz
  Downloading https://github.com/ansible/ansible/archive/devel.tar.gz (10.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 10.7/10.7 MB 9.3 MB/s eta 0:00:00
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Installing backend dependencies: started
  Installing backend dependencies: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
Collecting jinja2>=3.0.0
  Downloading Jinja2-3.1.2-py3-none-any.whl (133 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.1/133.1 kB 3.6 MB/s eta 0:00:00
Collecting PyYAML>=5.1
  Downloading PyYAML-6.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (757 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 757.9/757.9 kB 14.9 MB/s eta 0:00:00
Collecting cryptography
  Downloading cryptography-40.0.1-cp36-abi3-manylinux_2_28_x86_64.whl (3.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.7/3.7 MB 30.5 MB/s eta 0:00:00
Collecting packaging
  Downloading packaging-23.0-py3-none-any.whl (42 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.7/42.7 kB 12.8 MB/s eta 0:00:00
Collecting resolvelib<1.1.0,>=0.5.3
  Downloading resolvelib-1.0.1-py2.py3-none-any.whl (17 kB)
Collecting MarkupSafe>=2.0
  Downloading MarkupSafe-2.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (27 kB)
Collecting cffi>=1.12
  Downloading cffi-1.15.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (462 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 462.6/462.6 kB 33.3 MB/s eta 0:00:00
Collecting pycparser
  Downloading pycparser-2.21-py2.py3-none-any.whl (118 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 118.7/118.7 kB 22.7 MB/s eta 0:00:00
Building wheels for collected packages: ansible-core
  Building wheel for ansible-core (pyproject.toml): started
  Building wheel for ansible-core (pyproject.toml): finished with status 'done'
  Created wheel for ansible-core: filename=ansible_core-2.15.0.dev0-py3-none-any.whl size=2237665 sha256=b0bee73f1c388cb6bb4531b68269b96dc7b4664df6ee477dcb16c81124861c80
  Stored in directory: /tmp/pip-ephem-wheel-cache-y_v7soeg/wheels/07/5c/8f/7df4e25e678a191c66d6e678537306fd465ebfbea902e9d6f1
Successfully built ansible-core
Installing collected packages: resolvelib, PyYAML, pycparser, packaging, MarkupSafe, jinja2, cffi, cryptography, ansible-core
Successfully installed MarkupSafe-2.1.2 PyYAML-6.0 ansible-core-2.15.0.dev0 cffi-1.15.1 cryptography-40.0.1 jinja2-3.1.2 packaging-23.0 pycparser-2.21 resolvelib-1.0.1

[notice] A new release of pip available: 22.3.1 -> 23.0.1
[notice] To update, run: python3 -m pip install --upgrade pip
STEP 5/8: RUN ./venv/bin/ansible --version
[WARNING]: You are running the development version of Ansible. You should only
run Ansible from "devel" if you are modifying the Ansible engine, or trying out
features under development. This is a rapidly changing source of code and can
become unstable at any point.
ansible [core 2.15.0.dev0]
  config file = None
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /root/venv/lib64/python3.11/site-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = ./venv/bin/ansible
  python version = 3.11.2 (main, Feb  8 2023, 00:00:00) [GCC 13.0.1 20230208 (Red Hat 13.0.1-0)] (/root/venv/bin/python3)
  jinja version = 3.1.2
  libyaml = True
STEP 6/8: RUN ./venv/bin/ansible-config dump --only-changed -t all
[WARNING]: You are running the development version of Ansible. You should only
run Ansible from "devel" if you are modifying the Ansible engine, or trying out
features under development. This is a rapidly changing source of code and can
become unstable at any point.
CONFIG_FILE() = None
STEP 7/8: RUN ./venv/bin/ansible -i localhost -c local localhost -m setup | grep pkg
[WARNING]: You are running the development version of Ansible. You should only
run Ansible from "devel" if you are modifying the Ansible engine, or trying out
features under development. This is a rapidly changing source of code and can
become unstable at any point.
[WARNING]: Unable to parse /root/localhost as an inventory source
[WARNING]: No inventory was parsed, only implicit localhost is available
        "ansible_pkg_mgr": "unknown",
STEP 8/8: RUN ./venv/bin/ansible -i localhost -c local localhost -m package -a name=zsh
[WARNING]: You are running the development version of Ansible. You should only
run Ansible from "devel" if you are modifying the Ansible engine, or trying out
features under development. This is a rapidly changing source of code and can
become unstable at any point.
[WARNING]: Unable to parse /root/localhost as an inventory source
[WARNING]: No inventory was parsed, only implicit localhost is available
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: NoneType: None
localhost | FAILED! => {
    "changed": false,
    "msg": "Could not find a module for unknown."
}
Error: building at STEP "RUN ./venv/bin/ansible -i localhost -c local localhost -m package -a name=zsh": while running runtime: exit status 2
```
</details>

### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct
rpm_query = '/usr/bin/rpm -q --whatprovides /usr/bin/apt-get'.split()
        if os.path.exists('/usr/bin/rpm'):
            with open(os.devnull, 'w') as null:
                try:
                    subprocess.check_call(rpm_query, stdout=null, stderr=null)
                    pkg_mgr_name = 'apt_rpm'
                except subprocess.CalledProcessError:
                    
                    
                    pkg_mgr_name = 'apt'
        return pkg_mgr_name
    def pkg_mgrs(self, collected_facts):
        
        
        
        
        if collected_facts['ansible_os_family'] == 'Altlinux':
            return filter(lambda pkg: pkg['path'] != '/usr/bin/pkg', PKG_MGRS)
        else:
            return PKG_MGRS
    def collect(self, module=None, collected_facts=None):