ansible_user_id has incorrect value when overriding playbook sudo value in a task

18 views
Skip to first unread message

ra...@future500.nl

unread,
Mar 27, 2014, 5:55:52 PM3/27/14
to ansible...@googlegroups.com
Hi All,

Perhaps I don't understand the ansible_user_id variable, but consider the following cases:

https://gist.github.com/ramondelafuente/9819526

When you set a single task to sudo:no when the playbook has sudo: yes (or the other way around), ansibile_ssh_user has an unexpected value.
The task runs with the proper user.

Is there currently a reliable way to get the actual user that runs a task in a variable?

Kind regards,


Ramon de la Fuente
@F_U_E_N_T_E
Reply all
Reply to author
Forward
0 new messages