Closed kubaw closed 4 years ago
@kubaw thank you for your contribution and apologies for the late merge. I will invite you to the RVM team so you can have better influence on this package...
@rvm/ansible I have tested this PR successfully on a client deployment.
Not only the warnings disappears, but #209 also appears to be closed (I'll comment over there).
Logs before:
TASK [rvm.ruby : Detect if rubies are installed] ************************************************************
[DEPRECATION WARNING]: evaluating ['ruby-2.5.8', 'ruby-2.5.7', 'ruby-2.5.3'] as a bare variable, this
behaviour will go away and you might need to add |bool to the expression in the future. Also see
CONDITIONAL_BARE_VARS configuration toggle.. This feature will be removed in version 2.12. Deprecation
warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
skipping: [vagrant-xyz] => (item=ruby-2.5.8)
skipping: [vagrant-xyz] => (item=ruby-2.5.7)
skipping: [vagrant-xyz] => (item=ruby-2.5.3)
Logs after:
TASK [rvm.ruby : Detect if rubies are installed] ************************************************************
skipping: [vagrant-xyz] => (item=ruby-2.5.8)
skipping: [vagrant-xyz] => (item=ruby-2.5.7)
skipping: [vagrant-xyz] => (item=ruby-2.5.3)
Thanks @kubaw!
I think checking condition like this:
rvm1_rubies | bool
doesn't work for array. It is always false. This causes an error:Looks like checking using
| length
works for arrays but it is also works for strings.