mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-30 04:00:21 -07:00
Add documentation for win_copy as become user needing temp dir set (#53211)
This commit is contained in:
parent
0df453bb5d
commit
aa1ed59e1b
1 changed files with 11 additions and 0 deletions
|
@ -154,6 +154,17 @@ EXAMPLES = r'''
|
||||||
win_copy:
|
win_copy:
|
||||||
content: abc123
|
content: abc123
|
||||||
dest: C:\Temp\foo.txt
|
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'''
|
RETURN = r'''
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue