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

Unprivileged user falls back to ubuntu #147

Open
fcevado opened this issue Mar 29, 2017 · 5 comments
Open

Unprivileged user falls back to ubuntu #147

fcevado opened this issue Mar 29, 2017 · 5 comments
Assignees

Comments

@fcevado
Copy link

fcevado commented Mar 29, 2017

Unprivileged user falls back to ubuntu instead of ssh user.

@vyngur
Copy link

vyngur commented Sep 3, 2021

Having the same issue. It appears so that the playbook user var is being ignored?

./main.yml:

...
    - block:
      - name: install rvm
        include_role:
          name: rvm.ruby
      become: yes
      become_user: user #<---
...

./roles/main.yml:

---
- hosts: all
  - name: Configure servers with ruby support for single user
    roles:
      - { role: rvm.ruby,
          tags: ruby,
          rvm1_rubies: "ruby-2.6.6",
          rvm1_user: "user", #<---
          rvm1_bundler_install: yes,
          rvm1_install_path: '~/.rvm',
          rvm1_rvm_latest_installer: 'https://raw.githubusercontent.com/rvm/rvm/master/binscripts/rvm-installer',
          rvm1_rvm_version: 'stable',
          rvm1_rvm_check_for_updates: yes,
          rvm1_gpg_keys: '409B6B1796C275462A1703113804BB82D39DC0E3',
          rvm1_gpg_key_server: 'hkps://keys.openpgp.org',
          rvm1_autolib_mode: 3
        }
TASK [install rvm] *************************************************************

TASK [rvm.ruby : Detect rvm binary] ********************************************
fatal: [hostname]: FAILED! => {"msg": "Failed to set permissions on the temporary files Ansible needs to create when becoming an unprivileged user (rc: 1, err: chmod: invalid mode: 'A+user:ubuntu:rx:allow'\nTry 'chmod --help' for more information.\n}). For information on working around this, see https://docs.ansible.com/ansible/2.11/user_guide/become.html#becoming-an-unprivileged-user"}

@pkuczynski
Copy link
Member

@thbar @sfgeorge what do you think?

@sfgeorge
Copy link
Contributor

sfgeorge commented Mar 28, 2022

This is worth investigating.

@fcevado, @vyngur Could you provide more info so we can reproduce this?

This project currently tests successfully against Ubuntu 14.04, 16.04, 18.04 and 20.04. Clearly, whatever issue you're hitting the current tests do not uncover. It'll be key if you provide a minimum reproducible case, in addition to the Ubuntu and rvm1-ansible versions, so we can understand the factors at play here. It would also be helpful to see a representation of the /etc/sudoers file as well.

@fcevado
Copy link
Author

fcevado commented Apr 2, 2022

@sfgeorge sorry, I can't help with that. I don't have access to the environment that had that issue. I'd wait on @vyngur for any feedback, but on my side I'm ok with closing this issue.

@vyngur
Copy link

vyngur commented Aug 16, 2022

Same as @fcevado, sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants