0

I'd like to run a wine command using a non privileged user account so it creates it in their wine folder. Is there a way become_user will auto detect the user that is running the ansible playbook?

For example, if I run the playbook and I install everything I need as a privileged user but I want to drop down to my own user account, is this possible?

chomes
  • 59
  • 7
  • Possible duplicate of [How to switch a user per task or set of tasks?](https://stackoverflow.com/questions/21344777/how-to-switch-a-user-per-task-or-set-of-tasks) – kenlukas Sep 20 '18 at 15:22

1 Answers1

1

You can use become: false on the task you want to run as the user executing the playbook (assuming you have already set become: true for the entire play)

Matt P
  • 2,452
  • 1
  • 12
  • 15
  • Thanks, I didn't use become: true in the code but I will do that, I just wanted to make sure user running the play would be used. – chomes Sep 21 '18 at 10:54