[feature request] ability to not install a system ruby version?
I want to install rbenv with this role but then not install a ruby version until later in my build when my app sources are checked out. There's a .ruby-version file which defines the proper ruby version (at which point I can just add a shell: bash -lc rbenv install line to install the correct ruby version without specifying it anywhere in my ansible vars. Does that make sense? Could it be possible to define rbenv.ruby_version as an empty/ false value to skip the default install?
@thom-nic can you show content of your .ruby-version file?
It's just a single line:
2.1.3
Rbenv already understands how to process it, it's sort of a generic .rbenv-version file. I just go to the root directory of your project and do rbenv install. rbenv also knows which ruby version to activate when running project executables (ruby, rake) by looking at the same file.
@thom-nic do you need to override ruby version from default 2.2.0 to your 2.1.3?
As can you see in Readme - you can setup any ruby with this role.
- hosts: all
vars:
rbenv:
env: user
version: v0.4.0
ruby_version: 2.0.0-p353
roles:
- role: zzet.rbenv
rbenv_users:
- user
as example
Yeah I understand I can set it up that way but I still have to specify the ruby version there in addition to what's in my project .ruby-version. rbenv's ruby shim will throw an error if what's in .ruby-version is different from what's defined in the ansible vars. Trying to keep it DRY and reduce the chance for errors.
Simply not installing a system ruby until the app is installed would fix that. I mean I can run rbenv install regardless after my app is installed and to ensure the proper ruby version is installed for my app but it will increase the build/ deploy time if two different rubies get installed.
:+1: it would be great to have an option to skip installing a Ruby and just set up rbenv instead.