Debian Codegraph @

lib/ansible/plugins/test/is_file.yml

raw
1 DOCUMENTATION:
2 name: file
3 author: Ansible Core
4 version_added: "2.5"
5 short_description: does the path resolve to an existing file
6 description:
7 - Check if the provided path maps to an existing file on the controller's filesystem (localhost)
8 aliases: [is_file]
9 options:
10 _input:
11 description: A path.
12 type: path
13
14 EXAMPLES: |
15 vars:
16 my_etc_hosts_is_a_file: "{{ '/etc/hosts' is file }}"
17 list_of_files: "{{ list_of_paths | select('file') }}"
18
19 RETURN:
20 _value:
21 description: Returns V(True) if the path corresponds to an existing file on the filesystem on the controller, V(False) if otherwise.
22 type: boolean