mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
Added fix for win_file with broken symlinks (#19146)
This commit is contained in:
parent
4e19adb919
commit
1c885cb848
2 changed files with 65 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue