### 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
- If set to C(repoid), disable excludes defined for given repo id.
    version_added: "2.7"
    type: str
  validate_certs:
    description:
      - This only applies if using a https url as the source of the rpm. e.g. for localinstall. If set to C(no), the SSL certificates will not be validated.
      - This should only set to C(no) used on personally controlled sites using self-signed certificates as it avoids verifying the source site.
    type: bool
    default: "yes"
    version_added: "2.7"
  sslverify:
    description:
      - Disables SSL validation of the repository server for this transaction.
      - This should be set to C(no) if one of the configured repositories is using an untrusted or self-signed certificate.
    type: bool
    default: "yes"
    version_added: "2.13"
  allow_downgrade:
    description:
      - Specify if the named package and version is allowed to downgrade
        a maybe already installed higher version of that package.
        Note that setting allow_downgrade=True can make this module
        behave in a non-idempotent way. The task could end up with a set
        of packages that does not match the complete list of specified
        packages to install (because dependencies between the downgraded
        package and others can cause changes to the packages which were
        in the earlier transaction).
    type: bool
    default: "no"
    version_added: "2.7"