<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def install_rbenv(name, user=None):
    '''
    Install rbenv if not installed. Allows you to require rbenv be installed
    prior to installing the plugins. Useful if you want to install rbenv
    plugins via the git or file modules and need them installed before
    installing any rubies.

    Use the rbenv.root configuration option to set the path for rbenv if you
    want a system wide install that is not in a user home dir.

    user: None
        The user to run rbenv as.
    '''
    ret = {'name': name, 'result': None, 'comment': '', 'changes': {}}

    if __opts__['test']:
        ret = _check_rbenv(ret, user=user)
        if ret['result'] is False:
            ret['result'] = None
            ret['comment'] = 'Rbenv is set to be installed'
        else:
            ret['result'] = True
            ret['comment'] = 'Rbenv is already installed'
        return ret

    return _check_and_install_rbenv(ret, user)