diff options
author | Abhijeet Kasurde <akasurde@redhat.com> | 2023-09-26 19:14:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-26 19:14:37 +0200 |
commit | 4071f3b803a7cbec83d6a6f32c232319e9a0e210 (patch) | |
tree | dd56be3de0ae5174ad0c8ccacb75d435f773e83b | |
parent | Prevent roles from using symlinks to overwrite files outside of the installat... (diff) | |
download | ansible-4071f3b803a7cbec83d6a6f32c232319e9a0e210.tar.xz ansible-4071f3b803a7cbec83d6a6f32c232319e9a0e210.zip |
file: add a note about follow=false (#81788)
While creating a symlink, we apply fs attributes changes
to the destination. But in case of a non-existent destination, we warn
the user. This warning message can be suppressed by setting follow=false.
Add a note of this behavior in the `follow` parameter.
Fixes: #50543
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
-rw-r--r-- | lib/ansible/modules/file.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/ansible/modules/file.py b/lib/ansible/modules/file.py index 0aa91838ef..6d30047f52 100644 --- a/lib/ansible/modules/file.py +++ b/lib/ansible/modules/file.py @@ -66,7 +66,7 @@ options: - > Force the creation of the symlinks in two cases: the source file does not exist (but will appear later); the destination exists and is a file (so, we need to unlink the - O(path) file and create symlink to the O(src) file in place of it). + O(path) file and create a symlink to the O(src) file in place of it). type: bool default: no follow: @@ -74,6 +74,8 @@ options: - This flag indicates that filesystem links, if they exist, should be followed. - O(follow=yes) and O(state=link) can modify O(src) when combined with parameters such as O(mode). - Previous to Ansible 2.5, this was V(false) by default. + - While creating a symlink with a non-existent destination, set O(follow) to V(false) to avoid a warning message related to permission issues. + The warning message is added to notify the user that we can not set permissions to the non-existent destination. type: bool default: yes version_added: '1.8' |