mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
gem: add support for --env-shebang (#4377)
* gem: add support for --env-shebang * fix version added
This commit is contained in:
parent
0c9d895438
commit
90bf5434d0
1 changed files with 10 additions and 1 deletions
|
@ -63,6 +63,12 @@ options:
|
||||||
- Override the path to the gem executable
|
- Override the path to the gem executable
|
||||||
required: false
|
required: false
|
||||||
version_added: "1.4"
|
version_added: "1.4"
|
||||||
|
env_shebang:
|
||||||
|
description:
|
||||||
|
- Rewrite the shebang line on installed scripts to use /usr/bin/env.
|
||||||
|
required: false
|
||||||
|
default: "no"
|
||||||
|
version_added: "2.2"
|
||||||
version:
|
version:
|
||||||
description:
|
description:
|
||||||
- Version of the gem to be installed/removed.
|
- Version of the gem to be installed/removed.
|
||||||
|
@ -201,6 +207,8 @@ def install(module):
|
||||||
cmd.append('--no-ri')
|
cmd.append('--no-ri')
|
||||||
else:
|
else:
|
||||||
cmd.append('--no-document')
|
cmd.append('--no-document')
|
||||||
|
if module.params['env_shebang']:
|
||||||
|
cmd.append('--env-shebang')
|
||||||
cmd.append(module.params['gem_source'])
|
cmd.append(module.params['gem_source'])
|
||||||
if module.params['build_flags']:
|
if module.params['build_flags']:
|
||||||
cmd.extend([ '--', module.params['build_flags'] ])
|
cmd.extend([ '--', module.params['build_flags'] ])
|
||||||
|
@ -218,7 +226,8 @@ def main():
|
||||||
state = dict(required=False, default='present', choices=['present','absent','latest'], type='str'),
|
state = dict(required=False, default='present', choices=['present','absent','latest'], type='str'),
|
||||||
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'),
|
||||||
include_doc = dict(required=False, default=False, type-'bool'),
|
include_doc = dict(required=False, default=False, type='bool'),
|
||||||
|
env_shebang = 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'),
|
build_flags = dict(required=False, type='str'),
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in a new issue