From 5ffb677b00ac41d3173b5e79445fcf16e0b2ff7f Mon Sep 17 00:00:00 2001 From: az7arul Date: Sat, 6 Jun 2015 01:54:00 +0600 Subject: [PATCH] add `include_doc` option --- lib/ansible/modules/packaging/language/gem.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/packaging/language/gem.py b/lib/ansible/modules/packaging/language/gem.py index 1d15763fbb7..7bfcca83abd 100644 --- a/lib/ansible/modules/packaging/language/gem.py +++ b/lib/ansible/modules/packaging/language/gem.py @@ -73,6 +73,12 @@ options: required: false default: "no" version_added: "1.6" + include_doc: + description: + - Install with or without docs. + required: false + default: "no" + version_added: "2.0" build_flags: description: - Allow adding build flags for gem compilation @@ -189,8 +195,9 @@ def install(module): cmd.append('--no-user-install') if module.params['pre_release']: cmd.append('--pre') - cmd.append('--no-rdoc') - cmd.append('--no-ri') + if not module.params['include_doc']: + cmd.append('--no-rdoc') + cmd.append('--no-ri') cmd.append(module.params['gem_source']) if module.params['build_flags']: cmd.extend([ '--', module.params['build_flags'] ]) @@ -208,6 +215,7 @@ def main(): state = dict(required=False, default='present', choices=['present','absent','latest'], type='str'), user_install = dict(required=False, default=True, type='bool'), pre_release = dict(required=False, default=False, type='bool'), + include_doc = dict(required=False, default=False, type-'bool'), version = dict(required=False, type='str'), build_flags = dict(required=False, type='str'), ),