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

Using role with a --become-user call fails 0.8.4 --> 0.9.0 #92

Open
pcm32 opened this issue Oct 28, 2019 · 2 comments
Open

Using role with a --become-user call fails 0.8.4 --> 0.9.0 #92

pcm32 opened this issue Oct 28, 2019 · 2 comments

Comments

@pcm32
Copy link
Member

pcm32 commented Oct 28, 2019

I used to call this role within a playbook at version 0.8.4 and executing a call in the form of:

ansible-playbook --become --become-user=gxa_galaxy --inventory=hosts playbook/playbook.yml

used to work. I need to do it like this since I ssh with one user but become another one for running things. The error I get now is:

TASK [galaxyproject.galaxy : Set Galaxy user facts] ************************************************************************************************************************************************
fatal: []: FAILED! => {"msg": "The field 'remote_user' has an invalid value, which includes an undefined variable. The error was: '__galaxy_remote_user' is undefined"}
	to retry, use: --limit @/Users/pmoreno/Development/ansible/galaxy-lsf/playbook/playbook.retry

I think that the role now tries to set __galaxy_remote_user from ansible_user. But if I set ansible_user to the user I become (the user I want galaxy to use), I cannot ssh into the target machine.

@natefoo
Copy link
Member

natefoo commented Oct 28, 2019

Ansible has really made this difficult for us. I'll revisit privilege separation vars yet again. Presumably #84 broke this for you.

@natefoo
Copy link
Member

natefoo commented Oct 28, 2019

What's the output of the task Set privilege separation default variables, and, just for fun, can you add a task to the top of tasks/main.yml that does:

- name: Get ansible_user value
  debug:
    var: ansible_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

No branches or pull requests

2 participants