### Summary

The [`filename` parameter docs](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/apt_repository_module.html#parameter-filename) don't give enough info to tell how the file name is generated.

I believe my `repo: deb https://packagecloud.io/linz/prod/ubuntu/ {{ ansible_distribution_release }} main` is hanging indefinitely ~~, and I suspect this has something to do with the file name being a duplicate, resulting in a background prompt which is never printed or dismissed, but it's hard to tell based on the [code](https://github.com/ansible/ansible/blob/f3be331c9cb2f2c6edeb0bdf28a1e8a9681d727c/lib/ansible/modules/apt_repository.py#L235-L258)~~ (Based on copying the code into a Python interpreter it looks like the generated file name is `packagecloud_io_linz_prod_ubuntu.list`, which looks fine.).

### Issue Type

Documentation Report

### Component Name

lib/ansible/modules/apt_repository.py

### Ansible Version

```console
N/A
```


### Configuration

```console
N/A
```


### OS / Environment

N/A

### Additional Information

N/A

### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct
if self.apt_key_bin:
                        command = [self.apt_key_bin, 'adv', '--recv-keys', '--no-tty', '--keyserver', 'hkp://keyserver.ubuntu.com:80',
                                   info['signing_key_fingerprint']]
                    else:
                        
                        for keydir in APT_KEY_DIRS:
                            if os.path.exists(keydir):
                                break
                        else:
                            self.module.fail_json("Unable to find any existing apt gpgp repo directories, tried the following: %s" % ', '.join(APT_KEY_DIRS))
                        keyfile = '%s/%s-%s-%s.gpg' % (keydir, os.path.basename(source).replace(' ', '-'), ppa_owner, ppa_name)
                        command = [self.gpg_bin, '--no-tty', '--keyserver', 'hkp://keyserver.ubuntu.com:80', '--export', info['signing_key_fingerprint']]
                    rc, stdout, stderr = self.module.run_command(command, check_rc=True, encoding=None)
                    if keyfile:
                        
                        if len(stdout) == 0:
                            self.module.fail_json(msg='Unable to get required signing key', rc=rc, stderr=stderr, command=command)
                        try:
                            with open(keyfile, 'wb') as f:
                                f.write(stdout)
                            self.module.log('Added repo key "%s" for apt to file "%s"' % (info['signing_key_fingerprint'], keyfile))
                        except (OSError, IOError) as e:
                            self.module.fail_json(msg='Unable to add required signing key for%s ', rc=rc, stderr=stderr, error=to_native(e))
            
            file = file or self._suggest_filename('%s_%s' % (line, self.codename))
        else:
            source = self._parse(line, raise_if_invalid_or_disabled=True)[2]
            file = file or self._suggest_filename(source)
        self._add_valid_source(source, comment, file)
    def remove_source(self, line):