Class: Ansible::Ruby::Modules::Find

Inherits:
Base show all
Defined in:
lib/ansible/ruby/modules/generated/files/find.rb

Overview

Return a list of files based on specific criteria. Multiple criteria are AND’d together. For Windows targets, use the M(win_find) module instead.

Instance Method Summary collapse

Methods inherited from Base

#ansible_name, #to_h

Methods inherited from Ansible::Ruby::Models::Base

attr_option, attr_options, attribute, fix_inclusion, #initialize, remove_existing_validations, #to_h, validates

Constructor Details

This class inherits a constructor from Ansible::Ruby::Models::Base

Instance Method Details

#ageString, ...

Returns Select files whose age is equal to or greater than the specified time. Use a negative age to find files equal to or less than the specified time. You can choose seconds, minutes, hours, days, or weeks by specifying the first letter of any of those words (e.g., “1w”).

Returns:

  • (String, Integer, nil)

    Select files whose age is equal to or greater than the specified time. Use a negative age to find files equal to or less than the specified time. You can choose seconds, minutes, hours, days, or weeks by specifying the first letter of any of those words (e.g., “1w”).



13
# File 'lib/ansible/ruby/modules/generated/files/find.rb', line 13

attribute :age

#age_stamp:atime, ...

Returns Choose the file property against which we compare age.

Returns:

  • (:atime, :ctime, :mtime, nil)

    Choose the file property against which we compare age.



44
# File 'lib/ansible/ruby/modules/generated/files/find.rb', line 44

attribute :age_stamp

#containsObject?

Returns One or more regex patterns which should be matched against the file content.

Returns:

  • (Object, nil)

    One or more regex patterns which should be matched against the file content.



25
# File 'lib/ansible/ruby/modules/generated/files/find.rb', line 25

attribute :contains

#depthObject?

Returns Set the maximum number of levels to decend into. Setting recurse to false will override this value, which is effectively depth 1. Default is unlimited depth.

Returns:

  • (Object, nil)

    Set the maximum number of levels to decend into. Setting recurse to false will override this value, which is effectively depth 1. Default is unlimited depth.



64
# File 'lib/ansible/ruby/modules/generated/files/find.rb', line 64

attribute :depth

#excludesArray<String>, ...

Returns One or more (shell or regex) patterns, which type is controlled by C(use_regex) option.,Items matching an C(excludes) pattern are culled from C(patterns) matches. Multiple patterns can be specified using a list.

Returns:

  • (Array<String>, String, nil)

    One or more (shell or regex) patterns, which type is controlled by C(use_regex) option.,Items matching an C(excludes) pattern are culled from C(patterns) matches. Multiple patterns can be specified using a list.



21
# File 'lib/ansible/ruby/modules/generated/files/find.rb', line 21

attribute :excludes

#file_type:any, ...

Returns Type of file to select.,The ‘link’ and ‘any’ choices were added in version 2.3.

Returns:

  • (:any, :directory, :file, :link, nil)

    Type of file to select.,The ‘link’ and ‘any’ choices were added in version 2.3.



32
# File 'lib/ansible/ruby/modules/generated/files/find.rb', line 32

attribute :file_type

#follow:yes, ...

Returns Set this to true to follow symlinks in path for systems with python 2.6+.

Returns:

  • (:yes, :no, nil)

    Set this to true to follow symlinks in path for systems with python 2.6+.



52
# File 'lib/ansible/ruby/modules/generated/files/find.rb', line 52

attribute :follow

#get_checksum:yes, ...

Returns Set this to true to retrieve a file’s sha1 checksum.

Returns:

  • (:yes, :no, nil)

    Set this to true to retrieve a file’s sha1 checksum.



56
# File 'lib/ansible/ruby/modules/generated/files/find.rb', line 56

attribute :get_checksum

#hidden:yes, ...

Returns Set this to true to include hidden files, otherwise they’ll be ignored.

Returns:

  • (:yes, :no, nil)

    Set this to true to include hidden files, otherwise they’ll be ignored.



48
# File 'lib/ansible/ruby/modules/generated/files/find.rb', line 48

attribute :hidden

#pathsString

Returns List of paths of directories to search. All paths must be fully qualified.

Returns:

  • (String)

    List of paths of directories to search. All paths must be fully qualified.



28
# File 'lib/ansible/ruby/modules/generated/files/find.rb', line 28

attribute :paths

#patternsString?

Returns One or more (shell or regex) patterns, which type is controlled by C(use_regex) option.,The patterns restrict the list of files to be returned to those whose basenames match at least one of the patterns specified. Multiple patterns can be specified using a list.

Returns:

  • (String, nil)

    One or more (shell or regex) patterns, which type is controlled by C(use_regex) option.,The patterns restrict the list of files to be returned to those whose basenames match at least one of the patterns specified. Multiple patterns can be specified using a list.



17
# File 'lib/ansible/ruby/modules/generated/files/find.rb', line 17

attribute :patterns

#recurse:yes, ...

Returns If target is a directory, recursively descend into the directory looking for files.

Returns:

  • (:yes, :no, nil)

    If target is a directory, recursively descend into the directory looking for files.



36
# File 'lib/ansible/ruby/modules/generated/files/find.rb', line 36

attribute :recurse

#sizeString?

Returns Select files whose size is equal to or greater than the specified size. Use a negative size to find files equal to or less than the specified size. Unqualified values are in bytes but b, k, m, g, and t can be appended to specify bytes, kilobytes, megabytes, gigabytes, and terabytes, respectively. Size is not evaluated for directories.

Returns:

  • (String, nil)

    Select files whose size is equal to or greater than the specified size. Use a negative size to find files equal to or less than the specified size. Unqualified values are in bytes but b, k, m, g, and t can be appended to specify bytes, kilobytes, megabytes, gigabytes, and terabytes, respectively. Size is not evaluated for directories.



40
# File 'lib/ansible/ruby/modules/generated/files/find.rb', line 40

attribute :size

#use_regex:yes, ...

Returns If false, the patterns are file globs (shell). If true, they are python regexes.

Returns:

  • (:yes, :no, nil)

    If false, the patterns are file globs (shell). If true, they are python regexes.



60
# File 'lib/ansible/ruby/modules/generated/files/find.rb', line 60

attribute :use_regex