### 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
support: none
    bypass_host_loop:
        support: none
    check_mode:
        support: full
    diff_mode:
        support: full
    platform:
        platforms: rhel
notes:
  - When used with a `loop:` each package will be processed individually, it is much more efficient to pass the list directly to the `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
  dnf:
    name: httpd
    state: latest