### Summary

See #74962 (feel free to re-open that one and close this one as a duplicate).

### Issue Type

Bug Report

### Component Name

yum

### Ansible Version

```console
$ ansible --version
ansible [core 2.11.6]
  config file = None
  configured module search path = ['/home/username/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/username/.local/lib/python3.8/site-packages/ansible
  ansible collection location = /home/username/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/username/.local/bin/ansible
  python version = 3.8.10 (default, Sep 28 2021, 16:10:42) [GCC 9.3.0]
  jinja version = 2.11.3
  libyaml = True
```


### Configuration

```console
$ ansible-config dump --only-changed
[nothing]
```


### OS / Environment

RHEL 7.9

### Steps to Reproduce

As part of the playbook, there are some tasks that install repo's and download RPM's:
<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)
- name: Register ansible Yum repository
  become: yes
  ansible.builtin.yum_repository:
    name: ansible-epel7
    description: Ansible Red Hat 7 EPEL
    baseurl: https://releases.ansible.com/ansible/rpm/release/epel-7-x86_64/
    gpgcheck: yes
    gpgkey: https://releases.ansible.com/keys/RPM-GPG-KEY-ansible-release.pub

- name: Download Ansible RPMs to local controller Ansible RPM repository
  include_tasks: yum-download.yml
  vars:
    rpm_name: ansible
```
and:
```yaml
- name: Register ansible-runner Yum repository
  become: yes
  ansible.builtin.yum_repository:
    name: ansible-runner
    description: Ansible target dependencies
    baseurl: https://releases.ansible.com/ansible-runner/rpm/epel-7-x86_64/
    gpgcheck: yes
    gpgkey: https://releases.ansible.com/keys/RPM-GPG-KEY-ansible-release.pub

- name: Download pexpect RPMs
  include_tasks: yum-download.yml
  vars:
    rpm_name: python2-pexpect
```
with `yum-download.yml` as:
```yaml
- name: 'Download {{ rpm_name }} RPMs using yum'
  become: yes
  ansible.builtin.yum:
    name: '{{ rpm_name }}'
    download_only: yes
    download_dir: '{{local_rpm_repo_folder}}'
  environment: '{{ env_http_proxy }}'
```

### Expected Results

When running this playbook against a Red Hat 7.9 VM on Azure, I would expect just the RPM's to be downloaded (with maybe some small caching by yum).

### Actual Results

When running this playbook against a Red Hat 7.9 VM on Azure, yum fills the entire `/var` with cached data. (In fact, because by default `/var` is 8G I had to extend it first; I end up with some 12G!)

Only after changing:
```yaml
    gpgcheck: yes
```
to:
```yaml
    gpgcheck: no
```
does this work as expected (no huge amounts of data in `/var`, RPM's downloaded).

### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct
- If set to C(yes), and C(state=latest) then only installs updates that have been marked security related.
    type: bool
    default: "no"
    version_added: "2.4"
  bugfix:
    description:
      - If set to C(yes), and C(state=latest) then only installs updates that have been marked bugfix related.
    default: "no"
    type: bool
    version_added: "2.6"
  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.4"
  enable_plugin:
    description:
      - I(Plugin) name to enable for the install/update operation.
        The enabled plugin will not persist beyond the transaction.
    type: list
    elements: str
    version_added: "2.5"