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'), ), )