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

ansible installation fails with default ~/.rvm #164

Open
stephanfriedrich opened this issue Feb 7, 2018 · 1 comment
Open

ansible installation fails with default ~/.rvm #164

stephanfriedrich opened this issue Feb 7, 2018 · 1 comment

Comments

@stephanfriedrich
Copy link

stephanfriedrich commented Feb 7, 2018

Hi, i try to install rvm via ansible, but the role cant update rvm because the role rvm-path is incorrect.
Imho, is my config correct. if i change the isntall-path to /usr/local/rvm installation finish successfully.

Ansible Error Log:

< TASK [rvm_io.ruby : Configure rvm] >
 ------------------------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["~/.rvm/bin/rvm", "autolibs", "3"], 
"delta": "0:00:00.009191", "end": "2018-02-07 12:59:39.913111", "msg": "non-zero return code", "rc": 1, "start": "2018-02-07 12:59:39.903920", 
"stderr": "~/.rvm/bin/rvm: Zeile 55: /usr/local/rvm/scripts/rvm: No such file or directory\nError sourcing RVM!", 
"stderr_lines": ["~/.rvm/bin/rvm: Zeile 55: /usr/local/rvm/scripts/rvm: No such file or directory", "Error sourcing RVM!"], "stdout": "", "stdout_lines": []}

role-config:

dependencies:
  - { role: rvm_io.ruby,
      tags: ['install_all', 'install_rvm'],
      rvm1_install_flags: '--auto-dotfiles',    
      rvm1_rubies: "{{var_rubies}}",
      rvm1_rvm_check_for_updates: True,
      rvm1_rvm_version: 'stable',              
      rvm1_user: '{{ansible_install_user}}',
    }
@stephanfriedrich
Copy link
Author

ok, i figured out why the issue occurs.

at first i had to update my rvm-role config with (like descriped in the readem):

To a user that is not ansible_user

You will need root access here because you will be writing outside the ansible user's home directory. Other than that it's the same as above, except you will supply a different user account:

rvm1_install_flags: '--auto-dotfiles --user-install'
rvm1_install_path: '/home/someuser/.rvm'

the issue

  • its not an rvm-role issue, i think the issue occurs because the shell dont know the rvm path.
    as is run "rvm autolib 3", i got the same issue, after reload my shell, the command runs without errors.

BUT , i dont know why the ansible-rvm-role dont know its current path, or why the shell wont reload the path.

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

1 participant