Closed wunzeco closed 8 years ago
sudo_user
directive to tasks that install rubies and gems
root@ip-10-152-153-205:/opt/ansible# sudo su - jenkins
jenkins@ip-10-152-153-205:~$ ls -ld .rvm
drwxr-xr-x 25 jenkins jenkins 4096 Feb 9 10:38 .rvm
jenkins@ip-10-152-153-205:~$ ls -l .rvm
total 120
drwxr-xr-x 2 jenkins jenkins 4096 Feb 9 10:39 archives
drwxr-xr-x 2 jenkins jenkins 4096 Feb 9 10:38 bin
drwxr-xr-x 3 jenkins jenkins 4096 Feb 9 10:39 config
drwxr-xr-x 3 jenkins jenkins 4096 Feb 9 10:38 contrib
drwxr-xr-x 2 jenkins jenkins 4096 Feb 9 10:38 docs
drwxr-xr-x 2 jenkins jenkins 4096 Feb 9 10:39 environments
drwxr-xr-x 2 jenkins jenkins 4096 Feb 9 10:38 examples
drwxr-xr-x 2 jenkins jenkins 4096 Feb 9 10:38 gem-cache
drwxr-xr-x 4 jenkins jenkins 4096 Feb 9 10:39 gems
drwxr-xr-x 4 jenkins jenkins 4096 Feb 9 10:38 gemsets
drwxr-xr-x 4 jenkins jenkins 4096 Feb 9 10:38 help
drwxr-xr-x 2 jenkins jenkins 4096 Feb 9 10:38 hooks
-rw-r--r-- 1 jenkins jenkins 11 Feb 9 10:38 installed.at
drwxr-xr-x 3 jenkins jenkins 4096 Feb 9 10:38 lib
-rw-r--r-- 1 jenkins jenkins 603 Feb 9 10:38 LICENSE
drwxr-xr-x 5 jenkins jenkins 4096 Feb 9 10:39 log
drwxr-xr-x 3 jenkins jenkins 4096 Feb 9 10:38 man
drwxr-xr-x 10 jenkins jenkins 4096 Feb 9 10:38 patches
drwxr-xr-x 5 jenkins jenkins 4096 Feb 9 10:38 patchsets
-rw-r--r-- 1 jenkins jenkins 9706 Feb 9 10:38 README
-rw-r--r-- 1 jenkins jenkins 7 Feb 9 10:38 RELEASE
drwxr-xr-x 3 jenkins jenkins 4096 Feb 9 10:39 rubies
drwxr-xr-x 5 jenkins jenkins 4096 Feb 9 10:38 scripts
drwxr-xr-x 3 jenkins jenkins 4096 Feb 9 10:38 src
drwxr-xr-x 2 jenkins jenkins 4096 Feb 9 10:39 tmp
drwxr-xr-x 2 jenkins jenkins 4096 Feb 9 10:39 user
-rw-r--r-- 1 jenkins jenkins 8 Feb 9 10:38 VERSION
drwxr-xr-x 2 jenkins jenkins 4096 Feb 9 10:39 wrappers
jenkins@ip-10-152-153-205:~$ find .rvm/ -user root -exec ls -l {} \;
jenkins@ip-10-152-153-205:~$
Fix merged into master. For further details see https://github.com/rvm/rvm1-ansible/pull/85
Nothing more to do.
It is expected that when rvm1_user variable is non-root user, the rubies and gems of rvm installation should not be owned by root even if ansible was applied as root user.
Playbook
files-not-rvm_user-owned.txt