Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

errors in rubies task #78

Closed
alettieri opened this issue Jan 8, 2016 · 3 comments
Closed

errors in rubies task #78

alettieri opened this issue Jan 8, 2016 · 3 comments

Comments

@alettieri
Copy link
Contributor

I'm receiving the following error during the Install rubies task:

error while evaluating conditional: rvm1_rubies and item.rc != 0

When looking at the tasks/rubies.yml file:

In task Install rubies:

 when: rvm1_rubies and item.rc != 0

It seems that the dict attribute rc may be missing at times.

It works fine when there's a fallback value.

 when: rvm1_rubies and item.rc|default(0) != 0

In task Select default ruby:

The stdout may need a default fallback as well. It threw errors as well.

when: detect_default_ruby_version.stdout == '' or
        rvm1_default_ruby_version not in detect_default_ruby_version.stdout

works fine when changed to:

when: detect_default_ruby_version.stdout|default() == '' or
        rvm1_default_ruby_version not in detect_default_ruby_version.stdout

Fixing these two lines solved my problem.

Here are some rvm1 variables I'm using in case it helps:

rvm1_rubies:
  - 'ruby-2.2.0'
rvm1_install_flags: '--auto-dotfiles --user-install'
rvm1_rvm_version: 'stable'
rvm1_rvm_check_for_updates: True
@nickjj
Copy link
Contributor

nickjj commented Jan 8, 2016

Hi, thanks a lot for the bug report. It would be awesome if you could create a PR out of this. I'll merge it into the next release.

@alettieri
Copy link
Contributor Author

Cool. will do.

@alettieri
Copy link
Contributor Author

Another note. I should have mentioned that this happens when I set the --check flag.

alettieri added a commit to alettieri/rvm1-ansible that referenced this issue Jan 8, 2016
* Set defaults and always_run to support --check mode.
@nickjj nickjj closed this as completed in fa06348 Jan 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants