From aa1ed59e1b069be06c74a55d07f5ec547b2192b7 Mon Sep 17 00:00:00 2001 From: Bill Bagdon Date: Sun, 3 Mar 2019 06:59:43 -0500 Subject: [PATCH] Add documentation for win_copy as become user needing temp dir set (#53211) --- lib/ansible/modules/windows/win_copy.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/ansible/modules/windows/win_copy.py b/lib/ansible/modules/windows/win_copy.py index 04549c45685..70f8f161935 100644 --- a/lib/ansible/modules/windows/win_copy.py +++ b/lib/ansible/modules/windows/win_copy.py @@ -154,6 +154,17 @@ EXAMPLES = r''' win_copy: content: abc123 dest: C:\Temp\foo.txt + +- name: Copy a single file as another user + win_copy: + src: NuGet.config + dest: '%AppData%\NuGet\NuGet.config' + vars: + ansible_become_user: user + ansible_become_password: pass + # The tmp dir must be set when using win_copy as another user + # This ensures the become user will have permissions for the operation + ansible_remote_tmp: '%temp%' ''' RETURN = r'''