Added fix for win_file with broken symlinks (#19146)

This commit is contained in:
Jordan Borean 2017-02-09 12:49:49 +10:00 committed by Matt Davis
commit 1c885cb848
2 changed files with 65 additions and 1 deletions

View file

@ -496,6 +496,24 @@
- file_result.changed
- "stat_result.stat.exists == False"
- name: create folder to point set symbolic link for
win_file:
path: "{{win_output_dir}}/link-test/link-target"
state: directory
- name: create symbolic link
win_command: cmd.exe /c mklink /d "{{win_output_dir}}\link-test\link" "{{win_output_dir}}\link-test\link-target"
- name: remove symbolic link target
win_file:
path: "{{win_output_dir}}/link-test/link-target"
state: absent
- name: remove parent folder with broken link
win_file:
path: "{{win_output_dir}}/link-test"
state: absent
- name: clean up sub1
win_file: path={{win_output_dir}}/sub1 state=absent