mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Add ruby build configure options to rbenv module
- Allows you to pass in configure options to ruby build environment when building rubies via rbenv
This commit is contained in:
parent
87b25ed67a
commit
864f936046
@ -19,6 +19,7 @@ __func_alias__ = {
|
||||
|
||||
__opts__ = {
|
||||
'rbenv.root': None,
|
||||
'rbenv.build_env': None,
|
||||
}
|
||||
|
||||
|
||||
@ -163,8 +164,16 @@ def install_ruby(ruby, runas=None):
|
||||
ruby = re.sub(r'^ruby-', '', ruby)
|
||||
|
||||
env = None
|
||||
env_list = []
|
||||
|
||||
if __grains__['os'] in ('FreeBSD', 'NetBSD', 'OpenBSD'):
|
||||
env = 'MAKE=gmake'
|
||||
env_list.append('MAKE=gmake')
|
||||
|
||||
if __salt__['config.option']('rbenv.build_env'):
|
||||
env_list.append(__salt__['config.option']('rbenv.build_env'))
|
||||
|
||||
if env_list:
|
||||
env = ' '.join(env_list)
|
||||
|
||||
ret = {}
|
||||
ret = _rbenv_exec('install', ruby, env=env, runas=runas, ret=ret)
|
||||
|
Loading…
Reference in New Issue
Block a user