Is there a way to "become_user" per task on a Windows?

- name: Install programs (win_shell)
  win_shell: "{{ item.dest }}/{{ item.program }} {{ item.arguments }}"
  register: cmd
  when:
    - window_packages is defined
  with_items:
    - "{{ window_packages }}"
  become_user: bob
  tags: win_workstation2

Running the command with -vvvv shows I'm still WINRM as the Administrator

<PC130.corp.local> ESTABLISH WINRM CONNECTION FOR USER: 
[email protected] on PORT 5986 TO PC130.corp.local EXEC (via 
pipeline wrapper)

Not sure how to check what user the task is running as but I don't find the 
stuff I'd expect in AppData\Local

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/fb4fa3f8-064f-4d9b-820d-c25901d4b0bb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to