rvm / rvm1-ansible

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

Check rvm1_delete_ruby is defined #190

Closed gpeng closed 4 years ago

gpeng commented 5 years ago

Fixes 'ruby' is undefined error when using rvm1_delete_ruby

Fixes #156

pkuczynski commented 5 years ago

Looks good, thx! Could u please also update CHANGELOG?

pkuczynski commented 5 years ago

Seems that your PR fails with following error message:

The conditional check 'rvm1_delete_ruby if defined' failed. The error was: template error while templating string: expected token 'end of statement block', got 'if'. String: {% if rvm1_delete_ruby if defined %} True {% else %} False {% endif %}

The error appears to have been in '/home/travis/build/rvm/rvm1-ansible/tasks/rubies.yml': line 65, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

- name: Detect if ruby version can be deleted
  ^ here
gpeng commented 5 years ago

@pkuczynski I've fixed the issue and added an 'unreleased' CHANGELOG entry. CI is still failing though with GPG issues. We've been seeing this on Ubuntu and fixed by importing the keys before running this role. Not sure what's going on as I tried importing the keys inside the container (on centos6) with exactly the same command as this role is using and it worked fine but fails when Ansible runs it.

thbar commented 5 years ago

This would be helpful today. What can we do to help shipping this?

mmolinac commented 4 years ago

I got the same error today about rvm1_delete_ruby. I can see that the issue has been solved in this PR, but also that the tests are complaining about:

"ERROR:  Error installing bundler:\n\tbundler requires Ruby version >= 2.3.0."

Could somebody fix the required bundler version or Ruby test version instead, please ?

pkuczynski commented 4 years ago

@Kulgar which check is better? | bool or is defined?

thbar commented 4 years ago

@rvm/ansible I believe this is a duplicate of https://github.com/rvm/rvm1-ansible/pull/212 (which I'm currently testing). Both will need a bit more work. I'll close this one, but please re-open if my evaluation is incorrect.

Thanks @gpeng for the initial work though!