Merge pull request #3400 from diko4096/patch-1

Update gem
reviewable/pr18780/r1
Michael DeHaan 11 years ago
commit 8065e414d1

@ -51,6 +51,11 @@ options:
- The repository from which the gem will be installed - The repository from which the gem will be installed
required: false required: false
aliases: [source] aliases: [source]
user_install:
description:
- Install gem in user's local gems cache or for all users
required: false
default: "yes"
version: version:
description: description:
- Version of the gem to be installed/removed. - Version of the gem to be installed/removed.
@ -151,6 +156,8 @@ def install(module):
else: else:
if major and major < 2: if major and major < 2:
cmd.append('--include-dependencies') cmd.append('--include-dependencies')
if not module.params['user_install']:
cmd.append('--no-user-install')
cmd.append('--no-rdoc') cmd.append('--no-rdoc')
cmd.append('--no-ri') cmd.append('--no-ri')
cmd.append(module.params['gem_source']) cmd.append(module.params['gem_source'])
@ -165,6 +172,7 @@ def main():
name = dict(required=True, type='str'), name = dict(required=True, type='str'),
repository = dict(required=False, aliases=['source'], type='str'), repository = dict(required=False, aliases=['source'], type='str'),
state = dict(required=False, choices=['present','absent','latest'], type='str'), state = dict(required=False, choices=['present','absent','latest'], type='str'),
user_install = dict(required=False, default=True, type='bool'),
version = dict(required=False, type='str'), version = dict(required=False, type='str'),
), ),
supports_check_mode = True, supports_check_mode = True,

Loading…
Cancel
Save