Ansible for windows

30 views
Skip to first unread message

Arjan Goos

unread,
Jan 9, 2020, 10:03:27 AM1/9/20
to Ansible Project
Hi,

Is it possible to create itemType Junction (symbolic link) . 

I want something like this:

 New-Item -ItemType Junction -Path D:\Program-Files\website-Name conf -Target D:\Data\Website\conf 

Groeten,

Arjan 

J Hawkesworth

unread,
Jan 12, 2020, 6:01:25 AM1/12/20
to Ansible Project
If i recall correctly the win_file module doesn't yet support links (pull requests welcome).

However, you can probably run this via the ansible win_shell or script module



If you want to make the command re-runnable you can probably use the win_stat module to see if the file exists / is a link, register the result and only run your command above if needed.


Hope this helps,

Jon
Reply all
Reply to author
Forward
0 new messages