mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
[PR #5822/fe520a6b backport][stable-6] Gem: Support force flag when uninstalling (#5884)
Gem: Support force flag when uninstalling (#5822)
* Gem: Support force flag when uninstalling
* Improve docs' syntax
* Add changelog fragment
(cherry picked from commit fe520a6b09)
Co-authored-by: Juan Vela <juan.vela.bcn@gmail.com>
This commit is contained in:
@@ -105,7 +105,7 @@ options:
|
||||
required: false
|
||||
force:
|
||||
description:
|
||||
- Force gem to install, bypassing dependency checks.
|
||||
- Force gem to (un-)install, bypassing dependency checks.
|
||||
required: false
|
||||
default: false
|
||||
type: bool
|
||||
@@ -235,6 +235,8 @@ def uninstall(module):
|
||||
else:
|
||||
cmd.append('--all')
|
||||
cmd.append('--executable')
|
||||
if module.params['force']:
|
||||
cmd.append('--force')
|
||||
cmd.append(module.params['name'])
|
||||
module.run_command(cmd, environ_update=environ, check_rc=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user