Debian Codegraph @

lib/ansible/plugins/test/exists.yml

raw
1 DOCUMENTATION:
2 name: exists
3 author: Ansible Core
4 version_added: "2.5"
5 short_description: does the path exist, follow symlinks
6 description:
7 - Check if the provided path maps to an existing filesystem object on the controller (localhost).
8 - Follows symlinks and checks the target of the symlink instead of the link itself, use the P(ansible.builtin.link#test)
9 or P(ansible.builtin.link_exists#test) tests to check on the link.
10 options:
11 _input:
12 description: a path
13 type: path
14
15 EXAMPLES: |
16 vars:
17 my_etc_hosts_exists: "{{ '/etc/hosts' is exists }}"
18 list_of_local_files_to_copy_to_remote: "{{ list_of_all_possible_files | select('exists') }}"
19
20 RETURN:
21 _value:
22 description: Returns V(True) if the path corresponds to an existing filesystem object on the controller (after following symlinks), V(False) if otherwise.
23 type: boolean