### Summary

When I try to use the yum/dnf module to install an RPM from a local file, not from a repo, it fails with a GPG error.

`Failed to validate GPG signature for xyy.rpm`

I've created a simple example here complete with a Vagrant to make it easy to reproduce:

https://github.com/jeffmacdonald/ansible-yum-error



### Issue Type

Bug Report

### Component Name

dnf, yum

### Ansible Version

```console
$ ansible --version

ansible [core 2.11.1]
  config file = None
  configured module search path = ['/Users/jeff.macdonald/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/jeff.macdonald/.pyenv/versions/3.9.5/envs/python3.9.5/lib/python3.9/site-packages/ansible
  ansible collection location = /Users/jeff.macdonald/.ansible/collections:/usr/share/ansible/collections
  executable location = /Users/jeff.macdonald/.pyenv/versions/python3.9.5/bin/ansible
  python version = 3.9.5 (default, May 30 2021, 21:26:15) [Clang 12.0.5 (clang-1205.0.22.9)]
  jinja version = 3.0.1
  libyaml = True
```


### Configuration

```console
$ ansible-config dump --only-changed

No output
```


### OS / Environment

Ansible is being run from a Mac (latest) on Rocky Linux 8.3

### Steps to Reproduce

https://github.com/jeffmacdonald/ansible-yum-error

```yaml
---
- name: Install Telegraf
  hosts: all
  tasks:
    - name: install influx gpg key
      become: yes
      rpm_key:
        key: "https://repos.influxdata.com/influxdb.key"
        state: present

    - name: download telegraf RPM
      get_url:
        url: https://dl.influxdata.com/telegraf/releases/telegraf-1.13.4-1.x86_64.rpm 
        dest: /tmp/telegraf-1.13.4-1.x86_64.rpm

    - name: install telegraf packages
      become: yes
      yum:
        name: /tmp/telegraf-1.13.4-1.x86_64.rpm
        state: present
```


### Expected Results

I expect the RPM to install

### Actual Results

```console
TASK [install telegraf packages] ***********************************************
fatal: [node1]: FAILED! => {"changed": false, "msg": "Failed to validate GPG signature for telegraf-1.13.4-1.x86_64"}
```


### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct
type: list
    elements: str
  disable_excludes:
    description:
      - Disable the excludes defined in DNF config files.
      - If set to C(all), disables all excludes.
      - If set to C(main), disable excludes defined in [main] in dnf.conf.
      - 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"
  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"