Comments (4)
FWIW, this works only with root user access but not the non-sudo(deploy user).
Workaround: I am currently changing the ownership to the deploy user later after rvm.ruby:
- name: Provision Web server
hosts: web
strategy: free
roles:
- {
role: rvm.ruby,
tags: ['ruby'],
become: yes,
# rvm1_install_flags: '--auto-dotfiles', # Remove --user-install from defaults
# rvm1_install_path: /usr/local/rvm, # Set to system location
rvm1_install_flags: '--auto-dotfiles --user-install',
rvm1_install_path: '/home/{{ deploy_user }}/.rvm',
rvm1_rubies: ['ruby-3.0.0'],
# rvm1_user: "{{ deploy_user }}",
rvm1_user: "{{ root_user }}", # Need root account to access system location
rvm1_rvm_version: 'stable',
}
- {
role: fix_rvm_access,
tags: ['ruby', 'rvm_access'],
become: yes
}
roles/fix_rvm_access/tasks/main.yml:
---
- name: Change dir access from root to app user
shell: chown -R app /home/{{ deploy_user }}/.rvm
become: true
- name: "Create ruby-3.0.0@{{ rvm_gemset_name }} gemset"
shell: /home/{{ deploy_user }}/.rvm/bin/rvm ruby-3.0.0 do /home/{{ deploy_user }}/.rvm/bin/rvm gemset create {{ rvm_gemset_name }}
from rvm1-ansible.
@sfgeorge @thbar should we do anything about it, or shall we just close it with this workaround documented here?
from rvm1-ansible.
@pkuczynski given that 3.0.0 lacks security fixes provided in later 3.0.x, I would probably close, unless the same issue also exists with 3.0.3 (https://www.ruby-lang.org/en/downloads/releases/).
from rvm1-ansible.
@suryart we will close for now, but let us know if the issue still exists and we will re-open...
from rvm1-ansible.
Related Issues (20)
- I don't get it. HOT 2
- Installing bundler fails when using a <major>.<minor>-latest version of Ruby
- bundler conflict HOT 3
- Regression: rubies are not installed HOT 6
- Configuration of autolibs when RVM is already installed
- How to do mixed-user install with this?
- Improving installation of Bundler HOT 11
- Ansible --check mode fails on "Delete ruby if relevant" HOT 1
- Migrate to a new "Continuous Integration as a Service" Platform HOT 1
- Problem installing rubies with rvm1_user HOT 1
- Use rvm/ubuntu_rvm ppa for ubuntu distributions
- Error while evaluating conditional (not ansible_check_mode and rvm1_gpg_keys != '' and (gpg_import is not defined or gpg_import.rc != 0)): 'dict object' has no attribute 'rc'
- Deprecation warnings HOT 1
- Import GPG keys from keyservers] / ipv4.pool.sks-keyservers.net HOT 2
- ruby install hangs on user input HOT 12
- CI Builds are not running HOT 4
- Releases not being pulled by Ansible Galaxy HOT 16
- Install bundler if not installed - fail HOT 2
- newb documentation question HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rvm1-ansible.