1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-03-31 01:16:17 +00:00

gem_module: Use --norc to avoid surprises

Run install and uninstall actions with `--norc`. This way ansible has
more control over the way gems are installed.
This commit is contained in:
Stanislav German-Evtushenko 2021-06-19 23:02:46 +09:00
parent e18de3f396
commit 66f40bcfe6
2 changed files with 14 additions and 12 deletions

View file

@ -200,6 +200,7 @@ def uninstall(module):
cmd = get_rubygems_path(module)
environ = get_rubygems_environ(module)
cmd.append('uninstall')
cmd.append('--norc')
if module.params['install_dir']:
cmd.extend(['--install-dir', module.params['install_dir']])
@ -228,6 +229,7 @@ def install(module):
cmd = get_rubygems_path(module)
cmd.append('install')
cmd.append('--norc')
if module.params['version']:
cmd.extend(['--version', module.params['version']])
if module.params['repository']: