Groups
Groups
Sign in
Groups
Groups
Ansible Project
Conversations
About
Send feedback
Help
Ansible for windows
30 views
Skip to first unread message
Arjan Goos
unread,
Jan 9, 2020, 10:03:27 AM
1/9/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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 AM
1/12/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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
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
Reply all
Reply to author
Forward
0 new messages