1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Gem: Support force flag when uninstalling (#5822)

* Gem: Support force flag when uninstalling

* Improve docs' syntax

* Add changelog fragment
This commit is contained in:
Juan Vela 2023-01-24 19:43:28 +01:00 committed by GitHub
parent f38bfaddf0
commit fe520a6b09
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- gem - fix force parameter not being passed to gem command when uninstalling (https://github.com/ansible-collections/community.general/pull/5822).

View file

@ -105,7 +105,7 @@ options:
required: false required: false
force: force:
description: description:
- Force gem to install, bypassing dependency checks. - Force gem to (un-)install, bypassing dependency checks.
required: false required: false
default: false default: false
type: bool type: bool
@ -235,6 +235,8 @@ def uninstall(module):
else: else:
cmd.append('--all') cmd.append('--all')
cmd.append('--executable') cmd.append('--executable')
if module.params['force']:
cmd.append('--force')
cmd.append(module.params['name']) cmd.append(module.params['name'])
module.run_command(cmd, environ_update=environ, check_rc=True) module.run_command(cmd, environ_update=environ, check_rc=True)