Ansible for windows

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

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

https://docs.ansible.com/ansible/latest/modules/script_module.html

https://docs.ansible.com/ansible/latest/modules/win_shell_module.html

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.

https://docs.ansible.com/ansible/latest/modules/win_stat_module.html

Hope this helps,

Jon