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

Last value from rvm1_rubies even if rvm1_default_ruby_version is set #163

Open
bolshakov opened this issue Jan 15, 2018 · 2 comments
Open

Comments

@bolshakov
Copy link

bolshakov commented Jan 15, 2018

Inventory file:

app:
  hosts:
    127.0.0.1:
      rvm1_rubies:
        - "ruby-2.1.1"
        - "ruby-2.3.5"
      rvm1_default_ruby_version: "ruby-2.1.1"

My playbook looks like this:

- hosts: app
  roles:
    - rvm_io.ruby
    - my_role

In my_role I use rvm1_default_ruby_version value to configure apache. I expect it is ruby-2.1.1, but actually it is set to ruby-2.3.5.

I factored tests app to reproduce the issue and print rvm1_default_ruby_version before, inside and after my role. It prints ruby-2.1.1, ruby-2.3.5 and ruby-2.1.1. I expect it is ruby-2.1.1.

TL;DR; inside my role rvm1_default_ruby_version does not equal to value set in inventory file.

Possibly related issue #34

@bolshakov bolshakov changed the title Latest value from rvm1_rubies even if rvm1_default_ruby_version is set Lost value from rvm1_rubies even if rvm1_default_ruby_version is set Jan 15, 2018
@bolshakov bolshakov changed the title Lost value from rvm1_rubies even if rvm1_default_ruby_version is set Last value from rvm1_rubies even if rvm1_default_ruby_version is set Jan 15, 2018
@lpaulmp
Copy link
Member

lpaulmp commented Jan 22, 2018

@bolshakov thanks for open this issue, I'll investigate it

@thbar
Copy link
Contributor

thbar commented Mar 28, 2018

I have the same problem: any override of rvm1_default_ruby_version I make is replaced. I'm using Ansible 2.4.3.

I wonder if maybe the variables defined by the role are late-evaluated & always winning.

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

3 participants