mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02: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:
parent
54099d77ff
commit
c7f7bd6050
2 changed files with 5 additions and 1 deletions
2
changelogs/fragments/5822-gem-uninstall-force.yml
Normal file
2
changelogs/fragments/5822-gem-uninstall-force.yml
Normal 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).
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue