rvm / rvm1-ansible

The official ansible RVM role to install and manage your Ruby versions.
MIT License
271 stars 136 forks source link

readme specifies root for multiuser installs which rvm docs warn against. #177

Closed coldnebo closed 2 years ago

coldnebo commented 6 years ago

rvm1-ansible roles section:

# Set the owner for the rvm directory
# NOTE: If you are doing a ROOT BASED INSTALL then
#       make sure you set rvm1_user to 'root'
rvm1_user: 'ubuntu'

rvm docs:

The installation process is similar for both installation methods, however, when installing a multi-user configuration, do not run the installer directly as/from the 'root' account! Always use the sudo command from a non-privileged user account. This is due to variables that are different between root's environment and a user's that aren't affected by an EUID change, as well as code checks in the install itself.

There seem to be ways to make this work, but the docs between projects are inconsistent.

isikyus commented 2 years ago

I believe both sets of docs are correct, but they're talking about different things.

rvm1-ansible does use sudo as, but indirectly. The tasks in https://github.com/rvm/rvm1-ansible/blob/master/tasks/main.yml use Ansible's "become" feature, which in turn uses sudo to run things as the specified rvm1_user.

pkuczynski commented 2 years ago

@thbar @sfgeorge what do you think? Should we do anything about it or just close it?

sfgeorge commented 2 years ago

@isikyus is right. The become feature is used, which in turn uses sudo. I believe this can be closed.

pkuczynski commented 2 years ago

Thanks for the feedback @sfgeorge. Closing...

thbar commented 2 years ago

It's not closed yet apparently, so I'll go ahead and close it @pkuczynski ; but if this comes up again, maybe we can add some documentation with what is here later!