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:
parent
e18de3f396
commit
66f40bcfe6
2 changed files with 14 additions and 12 deletions
|
|
@ -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']:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue