find
Collection: builtin
Full Name: parallax.builtin.find
Aliases: ansible.builtin.find, find
Synopsis
Manage find
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| paths | list | yes | List of paths of directories to search | |
| patterns | list | One or more shell or regex patterns | ||
| excludes | list | One or more shell or regex patterns to exclude | ||
| contains | string | A regular expression or pattern which should be matched against the file content | ||
| recurse | bool | false | If target is a directory, recursively descend into the directory looking for files | |
| file_type | string | file | Type of file to select Choices: any, directory, file, link | |
| follow | bool | false | Set this to true to follow symlinks in path for systems with python 2.6+ | |
| hidden | bool | false | Set this to true to include hidden files | |
| size | string | Select files whose size is equal to or greater than the specified size | ||
| age | string | Select files whose age is equal to or greater than the specified time | ||
| age_stamp | string | mtime | Choose the file property against which age is compared Choices: atime, ctime, mtime | |
| use_regex | bool | false | If false, the patterns are shell style globs | |
| get_checksum | bool | false | Set this to true to retrieve a file’s sha1 checksum | |
| checksum_algorithm | string | sha1 | Algorithm to determine checksum of file Choices: md5, sha1, sha224, sha256, sha384, sha512 | |
| depth | int | Set the maximum number of levels to descend into | ||
| read_whole_file | bool | false | When doing a contains search, determines whether the whole file is read into memory |
Example
- name: Example find task
find:
paths: <your_paths>