From e588e675d96b2a9d806e52ea1e06ec4172d403ae Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Tue, 30 May 2023 04:52:29 +1200 Subject: [PATCH] opkg: remove useless default value for force (#6513) * opkg: remove useless default value for force * add changelog frag * Update changelogs/fragments/6513-opkg-default-force.yml Co-authored-by: Felix Fontein * add to force param description * typo --------- Co-authored-by: Felix Fontein --- changelogs/fragments/6513-opkg-default-force.yml | 2 ++ plugins/modules/opkg.py | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 changelogs/fragments/6513-opkg-default-force.yml diff --git a/changelogs/fragments/6513-opkg-default-force.yml b/changelogs/fragments/6513-opkg-default-force.yml new file mode 100644 index 0000000000..1313473bc2 --- /dev/null +++ b/changelogs/fragments/6513-opkg-default-force.yml @@ -0,0 +1,2 @@ +minor_changes: + - opkg - remove default value ``""`` for parameter ``force`` as it causes the same behaviour of not having that parameter (https://github.com/ansible-collections/community.general/pull/6513). diff --git a/plugins/modules/opkg.py b/plugins/modules/opkg.py index d2ac314d03..308e1e85ec 100644 --- a/plugins/modules/opkg.py +++ b/plugins/modules/opkg.py @@ -46,6 +46,8 @@ options: force: description: - The C(opkg --force) parameter used. + - Passing C("") as value and not passing any value at all have both + the same effect of B(not) using any C(--force-) parameter. choices: - "" - "depends" @@ -58,7 +60,6 @@ options: - "remove" - "checksum" - "removal-of-dependent-packages" - default: "" type: str update_cache: description: @@ -114,8 +115,8 @@ class Opkg(StateModuleHelper): argument_spec=dict( name=dict(aliases=["pkg"], required=True, type="list", elements="str"), state=dict(default="present", choices=["present", "installed", "absent", "removed"]), - force=dict(default="", choices=["", "depends", "maintainer", "reinstall", "overwrite", "downgrade", "space", "postinstall", "remove", - "checksum", "removal-of-dependent-packages"]), + force=dict(choices=["", "depends", "maintainer", "reinstall", "overwrite", "downgrade", "space", + "postinstall", "remove", "checksum", "removal-of-dependent-packages"]), update_cache=dict(default=False, type='bool'), ), )