Is it possible to somehow access WSL2 filesystem (say \\wsl.localhost\Ubuntu\home\foo\bar
) when WinRM remoting into localhost using certificate based authentication method?
I am trying to do so from Ansible playbook I'd like to use to setup both WSL2 and Windows host, executing it locally from within WSL2 running on that host. I have working playbook that runs win_*
commands just fine but anything referring to UNC paths like the one above would end with error:
Cannot find path '\\wsl.localhost\Ubuntu\home\foo\' because it does not exist.
I am trying to work with files in that path directly in e.g. win_shell
task (e.g. ls
or Get-ChildItem
that works in interactive PowerShell does not work over WinRM).
Is it because of credential delegation not working with certificate method? Unfortunately because of other constraints I can't switch to CredSSP which is general recommendation I found all around internet. I am aware of this certificate method restriction mentioned in Ansible Documentation but not sure if double-hop or delegation comes into play in my scenario on localhost.
\\wsl.localhost\Ubuntu\home
. This answer might be related, and it counsels connecting over HTTP with NTLM auth.become: True
andbecome: DOMAIN\user
in Ansible (I thought thats granted by simply connecting but its not).