Allow to add build flags for gem installation
This commit is contained in:
parent
ae253593e3
commit
9a6eba43ef
1 changed files with 9 additions and 1 deletions
|
@ -73,6 +73,11 @@ options:
|
||||||
required: false
|
required: false
|
||||||
default: "no"
|
default: "no"
|
||||||
version_added: "1.6"
|
version_added: "1.6"
|
||||||
|
build_flags:
|
||||||
|
description:
|
||||||
|
- Allow adding build flags for gem compilation
|
||||||
|
required: false
|
||||||
|
version_added: "2.0"
|
||||||
author: Johan Wiren
|
author: Johan Wiren
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
@ -185,6 +190,8 @@ def install(module):
|
||||||
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'])
|
||||||
|
if module.params['build_flags']:
|
||||||
|
cmd.extend([ '--', module.params['build_flags'] ])
|
||||||
module.run_command(cmd, check_rc=True)
|
module.run_command(cmd, check_rc=True)
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
@ -200,6 +207,7 @@ def main():
|
||||||
user_install = dict(required=False, default=True, type='bool'),
|
user_install = dict(required=False, default=True, type='bool'),
|
||||||
pre_release = dict(required=False, default=False, type='bool'),
|
pre_release = dict(required=False, default=False, type='bool'),
|
||||||
version = dict(required=False, type='str'),
|
version = dict(required=False, type='str'),
|
||||||
|
build_flags = dict(required=False, type='str'),
|
||||||
),
|
),
|
||||||
supports_check_mode = True,
|
supports_check_mode = True,
|
||||||
mutually_exclusive = [ ['gem_source','repository'], ['gem_source','version'] ],
|
mutually_exclusive = [ ['gem_source','repository'], ['gem_source','version'] ],
|
||||||
|
|
Loading…
Reference in a new issue