yum_repository: Do not set default value for async (#76750)

* yum_repository: Do not set default value for async

The `async` repository option is deprecated in RHEL 8, but Ansible sets

```ini
async = 1
```

even when it's omitted from the module options, which causes `dnf` to complain
about an unknown configuration option.

This commit removes the default value from the `async` parameter, which means
it won't be added to the repository file if omitted from the module parameters.

Signed-off-by: Benoît Knecht <bknecht@protonmail.ch>

* Document the specific versions with the default True and the option deprecation for RHEL 8

Co-authored-by: s-hertel <19572925+s-hertel@users.noreply.github.com>
pull/78593/head
Benoît Knecht 3 years ago committed by GitHub
parent bf1ef5a1f3
commit 2e8082ebb0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,2 @@
minor_changes:
- yum_repository - do not give the ``async`` parameter a default value anymore, since this option is deprecated in RHEL 8. This means that ``async = 1`` won't be added to repository files if omitted, but it can still be set explicitly if needed.

@ -23,8 +23,11 @@ options:
description:
- If set to C(yes) Yum will download packages and metadata from this
repo in parallel, if possible.
- In ansible-core 2.11, 2.12, and 2.13 the default value is C(true).
- This option has been deprecated in RHEL 8. If you're using one of the
versions listed above, you can set this option to None to avoid passing an
unknown configuration option.
type: bool
default: 'yes'
bandwidth:
description:
- Maximum available network bandwidth in bytes/second. Used with the
@ -648,7 +651,7 @@ def main():
username=dict(),
)
argument_spec['async'] = dict(type='bool', default=True)
argument_spec['async'] = dict(type='bool')
module = AnsibleModule(
argument_spec=argument_spec,

Loading…
Cancel
Save