Hi

I'd expect the following two tasks to return the same output, however the 
first task returns the user that I was running ansible-playbook as and the 
second task returns the user set with -u.

I can understand why this might happen, however I need to access the -u 
username in a task that is delegated to localhost.

Any ideas how I could do that?

Thanks.

--- 
- name: debug vars 
  hosts: all 
  gather_facts: no 
  tasks: 
  - debug: var=ansible_user 
    delegate_to: localhost 

  - debug: var=ansible_user 

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/71c7f1e8-160b-43cc-bd5c-d53e4bc911b7n%40googlegroups.com.

Reply via email to