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

specify root user when installing deps #68

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ldenefle
Copy link

This PR fixes an issue I ran into when trying to use the role while becoming a non-user

My playbook looked like this

- name: install pyenv for a specific user
  hosts: my_host
  become: yes
  become_user: my_non_root_user
  roles: [markosamuli.pyenv]

When attempting this, the role fails when trying to update dependencies for pyenv on Linux. The reason for that is the role tries to become to use package which is valid as Ansible defaults become_user is root but in the case of a user-specific installation it does not work.
A simple fix is to specify the root user in Install pyenv build requirements.

Allows to use role when already becoming a non-root user
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

Successfully merging this pull request may close these issues.

None yet

1 participant