-
-
Notifications
You must be signed in to change notification settings - Fork 139
Closed
Labels
Description
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:
Lines 11 to 14 in deb1d3e
- name: Install rubies | |
command: '{{ rvm1_rvm }} install {{ item.item }} {{ rvm1_ruby_install_flags }}' | |
when: rvm1_rubies | bool and item.rc|default(0) != 0 | |
with_items: '{{ detect_rubies.results }}' |
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:
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
chauncey-garrett, froblesmartin and Kulgar