Clarify the behaviour of file's src parameter with relative paths

Fixes #21401

Also sdd some more tests to validate file state=link creates a symlink
which points to the file we intended.
This commit is contained in:
Toshio Kuratomi 2018-04-20 12:39:01 -07:00
commit ce796bc34d
2 changed files with 30 additions and 3 deletions

View file

@ -53,8 +53,9 @@ options:
choices: [ absent, directory, file, hard, link, touch ]
src:
description:
- path of the file to link to (applies only to C(state=link) and C(state=hard)). Will accept absolute,
relative and nonexisting paths. Relative paths are not expanded.
- path of the file to link to (applies only to C(state=link) and C(state=hard)). Will accept
absolute, relative and nonexisting paths. Relative paths are relative to the file being
created (C(path)) which is how the UNIX command C(ln -s SRC DEST) treats relative paths.
recurse:
description:
- recursively set the specified file attributes (applies only to directories)