title: How do I get a variable with the name of the user running ansible?
body: <p>I'm scripting a deployment process that takes the name of the user running the ansible script (e.g. tlau) and creates a deployment directory on the remote system based on that username and the current date/time (e.g. tlau-deploy-2014-10-15-16:52).</p>
  
  <p>You would think this is available in ansible facts (e.g. LOGNAME or SUDO_USER), but those are all set to either "root" or the deployment id being used to ssh into the remote system. None of those contain the local user, the one who is currently running the ansible process.</p>
  
  <p>How can I script getting the name of the user running the ansible process and use it in my playbook?</p>