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:
parent
f38bfaddf0
commit
fe520a6b09
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
|
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)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue