ANSIBLE_KEEP_REMOTE_FILES location on windows target?

139 views
Skip to first unread message

Gareth Stockdale

unread,
Dec 13, 2017, 5:19:54 AM12/13/17
to Ansible Project
Anyone know the default location of files on windows when using this to run a playbook?

ANSIBLE_KEEP_REMOTE_FILES=1

Thanks

Trond Hindenes

unread,
Dec 15, 2017, 5:52:38 PM12/15/17
to Ansible Project
temp folder of the user account remoting in. So something like
C:\users\myansibleusers\appdata\local\temp (if memory serves)

Jordan Borean

unread,
Dec 17, 2017, 3:52:43 PM12/17/17
to Ansible Project
Ansible used the TEMP environment variable to determine the path to the temporary folder, so you can just type in %TEMP% in Windows explorer to get there for the current user. When doing this through RDP you might be redirected to a folder called 1, 2, 3, ... but that's just an Explorer thing, you would have to move back 1 folder to be in the right location https://blogs.msdn.microsoft.com/oldnewthing/20110125-00/?p=11673.

In the default case it would be

C:\Users\ansibleuser\AppData\Local\Temp as Trond pointed out.

Thanks

Jordan

matt...@redhat.com

unread,
Dec 18, 2017, 9:18:56 PM12/18/17
to Ansible Project
The target dir is also visible if you run with -vvv or higher when we're not pipelining, eg:

<192.168.33.51> PUT "/tmp/tmpflvOc3" TO "C:\Users\vagrant\AppData\Local\Temp\ansible-tmp-1513649854.81-279137826312538\win_ping.ps1"
Reply all
Reply to author
Forward
0 new messages