link¶
Collection Note
This module is part of the ansible.builtin collection. To install the collection, use:
Added in version2.5.
Synopsis¶
- Check if the provided path maps to an existing symlink on the controller's filesystem (localhost).
Parameters¶
| Parameter | Defaults / Choices | Comments |
|---|---|---|
| _input path |
A path. |
Examples¶
ismyhostsalink: "{{ '/etc/hosts' is link}}"
list_of_symlinks: "{{ list_of_paths | select('link') }}"
Return Values¶
| Key | Data Type | Description | Returned |
|---|---|---|---|
| _value | boolean | Returns V(True) if the path corresponds to an existing symlink on the filesystem on the controller, V(False) if otherwise. |
Authors¶
- Ansible Core