rvm / rvm1-ansible

The official ansible RVM role to install and manage your Ruby versions.
MIT License
271 stars 136 forks source link

Regression: rubies are not installed #209

Closed thbar closed 4 years ago

thbar commented 4 years ago

I believe #204 introduced a regression which forbids the installation of the configured rubies, at least for me on Ansible 2.8.3.

In this code:

https://github.com/rvm/rvm1-ansible/blob/deb1d3e6212d9ec6605510554bf268d18688513e/tasks/rubies.yml#L11-L14

the rvm1_rubies | bool expression evaluates to false, which makes the install be skipped:

TASK [rvm.ruby : Install rubies] *************************************************************************
skipping: [vagrant-geo] => (item={'skip_reason': u'Conditional result was False', 'item': u'ruby-2.5.3', 'skipped': True, 'ansible_loop_var': u'item', 'changed': False}) 

This later results in an error during Install bundler if not installed, as reported by @AwolDes here:

https://github.com/rvm/rvm1-ansible/pull/204#issuecomment-511661331

Because no ruby is installed, the default alias is created, but the link resolves to a non-existing folder.

The explanation is here:

https://medium.com/opsops/wft-bool-filter-in-ansible-e7e2fd7a148f

[1,2,3]|bool -> false

I believe #207 and #208 are proposals to fix this.

thbar commented 4 years ago

FWIW, #204 PR was failing during CI because of this exact problem.

In particular, see:

thbar commented 4 years ago

Reverting to latest Galaxy release (2.1.2) solve the issue.

froblesmartin commented 4 years ago

Same issue here! #207 fixed it for me

Kulgar commented 4 years ago

Same here, #207 fixed it for me too

thbar commented 4 years ago

@rvm/ansible based on today's testing on a client deployment, I believe this is now fixed (via #207).

I will create a changelog PR to replace this.

thbar commented 4 years ago

See comment above. Advertised in #216, I'll close now.