mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-09 06:40:03 -07:00
Fix for file module with symlinks to nonexistent target (#39635)
* Fix for file module with symlinks to nonexistent target When creating a symlink to a nonexistent target, creating the symlink would work but subsequent runs of the task would fail because it was trying to operate on the target instead of the symlink. Fixes #39558
This commit is contained in:
parent
f75b7a9437
commit
4f664f8ff6
3 changed files with 25 additions and 2 deletions
|
@ -303,6 +303,15 @@
|
|||
that:
|
||||
- "file13_result.changed == true"
|
||||
|
||||
- name: Prove idempotence of force creation soft link to non existent
|
||||
file: src=/noneexistent dest={{output_dir}}/soft2.txt state=link force=yes
|
||||
register: file13a_result
|
||||
|
||||
- name: verify that the link to nonexistent is idempotent
|
||||
assert:
|
||||
that:
|
||||
- "file13a_result.changed == false"
|
||||
|
||||
- name: remove directory foobar
|
||||
file: path={{output_dir}}/foobar state=absent
|
||||
register: file14_result
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue