def _check_and_install_rbenv(ret, user=None):
 ret = _check_rbenv(ret, user)
 if (ret['result'] is False):
  if __salt__['rbenv.install'](user):
   ret['result'] = True
   ret['comment'] = 'Rbenv installed'
  else:
   ret['result'] = False
   ret['comment'] = 'Rbenv failed to install'
 else:
  ret['result'] = True
  ret['comment'] = 'Rbenv already installed'
 return ret

def _check_and_install_rbenv ( ret , user = None ) : ret = _check_rbenv ( ret , user ) if ( ret [ 'result' ] is False ) : if __salt__ [ 'rbenv.install' ] ( user ) : ret [ 'result' ] = True ret [ 'comment' ] = 'Rbenv installed' else : ret [ 'result' ] = False ret [ 'comment' ] = 'Rbenv failed to install' else : ret [ 'result' ] = True ret [ 'comment' ] = 'Rbenv already installed' return ret
verify that rbenv is installed .