### Summary

An error occurs using this Ansible code:

```yaml
- name: install docker
  ansible.builtin.package:
    name: moby-engine
    state: present
```

The [error](https://gitlab.com/robertdebock/ansible-role-docker/-/jobs/2078222255#L279):

```text
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TypeError: in method 'ConfigParser_setSubstitutions', argument 2 of type 'std::map< std::string,std::string,std::less< std::string >,std::allocator< std::pair< std::string const,std::string > > > const &'
```

The full error:

```text
fatal: [docker-fedora-rawhide]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n  File \"/root/.ansible/tmp/ansible-tmp-1644500487.7706077-1096-217210945615717/AnsiballZ_dnf.py\", line 107, in <module>\n    _ansiballz_main()\n  File \"/root/.ansible/tmp/ansible-tmp-1644500487.7706077-1096-217210945615717/AnsiballZ_dnf.py\", line 99, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/root/.ansible/tmp/ansible-tmp-1644500487.7706077-1096-217210945615717/AnsiballZ_dnf.py\", line 47, in invoke_module\n    runpy.run_module(mod_name='ansible.modules.dnf', init_globals=dict(_module_fqn='ansible.modules.dnf', _modlib_path=modlib_path),\n  File \"/usr/lib64/python3.10/runpy.py\", line 209, in run_module\n    return _run_module_code(code, init_globals, run_name, mod_spec)\n  File \"/usr/lib64/python3.10/runpy.py\", line 96, in _run_module_code\n    _run_code(code, mod_globals, init_globals,\n  File \"/usr/lib64/python3.10/runpy.py\", line 86, in _run_code\n    exec(code, run_globals)\n  File \"/tmp/ansible_ansible.legacy.dnf_payload_vdrv7w8l/ansible_ansible.legacy.dnf_payload.zip/ansible/modules/dnf.py\", line 1427, in <module>\n  File \"/tmp/ansible_ansible.legacy.dnf_payload_vdrv7w8l/ansible_ansible.legacy.dnf_payload.zip/ansible/modules/dnf.py\", line 1416, in main\n  File \"/tmp/ansible_ansible.legacy.dnf_payload_vdrv7w8l/ansible_ansible.legacy.dnf_payload.zip/ansible/modules/dnf.py\", line 1382, in run\n  File \"/tmp/ansible_ansible.legacy.dnf_payload_vdrv7w8l/ansible_ansible.legacy.dnf_payload.zip/ansible/modules/dnf.py\", line 704, in _base\n  File \"/tmp/ansible_ansible.legacy.dnf_payload_vdrv7w8l/ansible_ansible.legacy.dnf_payload.zip/ansible/modules/dnf.py\", line 674, in _specify_repositories\n  File \"/usr/lib/python3.10/site-packages/dnf/base.py\", line 545, in read_all_repos\n    for repo in reader:\n  File \"/usr/lib/python3.10/site-packages/dnf/conf/read.py\", line 42, in __iter__\n    for r in self._get_repos(self.conf.config_file_path):\n  File \"/usr/lib/python3.10/site-packages/dnf/conf/read.py\", line 109, in _get_repos\n    parser.setSubstitutions(substs)\n  File \"/usr/lib64/python3.10/site-packages/libdnf/conf.py\", line 1670, in setSubstitutions\n    return _conf.ConfigParser_setSubstitutions(self, substitutions)\nTypeError: in method 'ConfigParser_setSubstitutions', argument 2 of type 'std::map< std::string,std::string,std::less< std::string >,std::allocator< std::pair< std::string const,std::string > > > const &'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
```

It happens on Fedora Rawhide only, not Fedora 35.

### Issue Type

Bug Report

### Component Name

package

### Ansible Version

```console
$ ansible --version

ansible [core 2.12.2]
  config file = /Users/robertdb/Documents/git.adfinis.com/juniper/ansible-playbook-g
itlab/ansible.cfg
  configured module search path = ['/Users/robertdb/.ansible/plugins/modules', '/usr
/share/ansible/plugins/modules']
  ansible python module location = /opt/homebrew/lib/python3.9/site-packages/ansible
  ansible collection location = /Users/robertdb/Documents/git.adfinis.com/juniper/an
sible-playbook-gitlab/collections
  executable location = /opt/homebrew/bin/ansible
  python version = 3.9.2 (default, Mar 26 2021, 15:28:17) [Clang 12.0.0 (clang-1200.
0.32.29)]
  jinja version = 3.0.3
  libyaml = True
```


### Configuration

```console
$ ansible-config dump --only-changed
# (no output)
```


### OS / Environment

Ansible Controller: Mac OS X
Ansible managed node: Fedora Rawhide (currently "36")

### Steps to Reproduce

```yaml
- name: install docker
  ansible.builtin.package:
    name: moby-engine
    state: present
```


### Expected Results

I was hoping the package to be installed.

### Actual Results

```console
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TypeError: in method 'ConfigParser_setSubstitutions', argument 2 of type 'std::map< std::string,std::string,std::less< std::string >,std::allocator< std::pair< std::string const,std::string > > > const &'
```


### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct
support: none
    bypass_host_loop:
        support: none
    check_mode:
        support: full
    diff_mode:
        support: full
    platform:
        platforms: rhel
notes:
  - When used with a C(loop:) each package will be processed individually, it is much more efficient to pass the list directly to the I(name) option.
  - Group removal doesn't work if the group was installed with Ansible because
    upstream dnf's API doesn't properly mark groups as installed, therefore upon
    removal the module is unable to detect that the group is installed
    (https://bugzilla.redhat.com/show_bug.cgi?id=1620324)
requirements:
  - "python >= 2.6"
  - python-dnf
  - for the autoremove option you need dnf >= 2.0.1"
author:
  - Igor Gnatenko (@ignatenkobrain) <i.gnatenko.brain@gmail.com>
  - Cristian van Ee (@DJMuggs) <cristian at cvee.org>
  - Berend De Schouwer (@berenddeschouwer)
  - Adam Miller (@maxamillion) <admiller@redhat.com>
'''
EXAMPLES = '''
- name: Install the latest version of Apache
  ansible.builtin.dnf:
    name: httpd
    state: latest