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

Install bundler if not installed - fail #237

Open
back2net opened this issue Jul 22, 2022 · 2 comments
Open

Install bundler if not installed - fail #237

back2net opened this issue Jul 22, 2022 · 2 comments

Comments

@back2net
Copy link

back2net commented Jul 22, 2022

target host os: Rocky Linux release 8.6 (Green Obsidian)

ansible [core 2.12.3]
config file = /home/amfetamin/code/ansible/ansible.cfg
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3.10/site-packages/ansible
ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
executable location = /home/amfetamin/.local/bin/ansible
python version = 3.10.5 (main, Jun 6 2022, 18:49:26) [GCC 12.1.0]
jinja version = 3.1.1
libyaml = True

Playbook:
become: true
remote_user: root
gather_facts: yes
roles:
- { role: rvm.ruby,
tags: ruby,
rvm1_gpg_keys: '',
rvm1_rubies: ['ruby-2.6-latest'],
rvm1_rvm_version: 'stable',
rvm1_install_flags: '--auto-dotfiles',
rvm1_install_path: /usr/local/rvm,
rvm1_user: root,
}

TASK [rvm.ruby : Install bundler if not installed] *****************************************************************************************************************************************************************
failed: [msc-oxidized-srv01.svetlana-k.ru] (item={'changed': False, 'stdout': '', 'stderr': '', 'rc': 0, 'cmd': '/usr/local/rvm/bin/rvm list strings | grep ruby-2.6-latest | tail -n 1\n', 'start': '2022-07-22 11:49:40.041346', 'end': '2022-07-22 11:49:40.489776', 'delta': '0:00:00.448430', 'msg': '', 'invocation': {'module_args': {'_raw_params': '/usr/local/rvm/bin/rvm list strings | grep ruby-2.6-latest | tail -n 1\n', '_uses_shell': True, 'warn': False, 'stdin_add_newline': True, 'strip_empty_ends': True, 'argv': None, 'chdir': None, 'executable': None, 'creates': None, 'removes': None, 'stdin': None}}, 'stdout_lines': [], 'stderr_lines': [], 'failed': False, 'item': 'ruby-2.6-latest', 'ansible_loop_var': 'item'}) => {"ansible_loop_var": "item", "changed": false, "cmd": "ls /usr/local/rvm/wrappers/ | if ! grep "^bundler " ; then /usr/local/rvm/wrappers//gem install bundler ; fi\n", "delta": "0:00:00.008931", "end": "2022-07-22 11:49:42.073161", "item": {"ansible_loop_var": "item", "changed": false, "cmd": "/usr/local/rvm/bin/rvm list strings | grep ruby-2.6-latest | tail -n 1\n", "delta": "0:00:00.448430", "end": "2022-07-22 11:49:40.489776", "failed": false, "invocation": {"module_args": {"_raw_params": "/usr/local/rvm/bin/rvm list strings | grep ruby-2.6-latest | tail -n 1\n", "_uses_shell": true, "argv": null, "chdir": null, "creates": null, "executable": null, "removes": null, "stdin": null, "stdin_add_newline": true, "strip_empty_ends": true, "warn": false}}, "item": "ruby-2.6-latest", "msg": "", "rc": 0, "start": "2022-07-22 11:49:40.041346", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}, "msg": "non-zero return code", "rc": 127, "start": "2022-07-22 11:49:42.064230", "stderr": "/bin/sh: /usr/local/rvm/wrappers//gem: No such file or directory", "stderr_lines": ["/bin/sh: /usr/local/rvm/wrappers//gem: No such file or directory"], "stdout": "", "stdout_lines": []}

@thbar
Copy link
Contributor

thbar commented Jul 22, 2022

FWIW, I have chosen to install bundler myself now, and have shared my experience here https://thibautbarrere.com/2020/09/19/managing-bundler-and-rubygems-with-ansible. Hope this helps!

@Unknown-Guy
Copy link

This impacts older Ruby versions now:

bundler requires Ruby version >= 2.6.0. The current ruby version is 2.5.0

So setting specific bundler version would be useful.

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