Class: Ansible::Ruby::Modules::Stat
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::Stat
- Defined in:
- lib/ansible/ruby/modules/generated/files/stat.rb
Overview
Retrieves facts for a file similar to the linux/unix ‘stat’ command. For Windows targets, use the M(win_stat) module instead.
Instance Method Summary collapse
-
#checksum_algorithm ⇒ :md5, ...
Algorithm to determine checksum of file.
-
#follow ⇒ :yes, ...
Whether to follow symlinks.
-
#get_attributes ⇒ :yes, ...
Get file attributes using lsattr tool if present.
-
#get_checksum ⇒ :yes, ...
Whether to return a checksum of the file (default sha1).
-
#get_md5 ⇒ :yes, ...
Whether to return the md5 sum of the file.,Will return None if not a regular file or if we’re unable to use md5 (Common for FIPS-140 compliant systems).,The default of this option changed from C(yes) to C(no) in Ansible 2.5 and will be removed altogether in Ansible 2.9.,Use C(get_checksum=true) with C(checksum_algorithm=md5) to return an md5 hash under the C(checksum) return value.
-
#get_mime ⇒ :yes, ...
Use file magic and return data about the nature of the file.
-
#path ⇒ String
The full path of the file/object to get the facts of.
Methods inherited from Base
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
#checksum_algorithm ⇒ :md5, ...
Returns Algorithm to determine checksum of file. Will throw an error if the host is unable to use specified algorithm.,The remote host has to support the hashing method specified, C(md5) can be unavailable if the host is FIPS-140 compliant.
29 |
# File 'lib/ansible/ruby/modules/generated/files/stat.rb', line 29 attribute :checksum_algorithm |
#follow ⇒ :yes, ...
Returns Whether to follow symlinks.
17 |
# File 'lib/ansible/ruby/modules/generated/files/stat.rb', line 17 attribute :follow |
#get_attributes ⇒ :yes, ...
Returns Get file attributes using lsattr tool if present.
37 |
# File 'lib/ansible/ruby/modules/generated/files/stat.rb', line 37 attribute :get_attributes |
#get_checksum ⇒ :yes, ...
Returns Whether to return a checksum of the file (default sha1).
25 |
# File 'lib/ansible/ruby/modules/generated/files/stat.rb', line 25 attribute :get_checksum |
#get_md5 ⇒ :yes, ...
Returns Whether to return the md5 sum of the file.,Will return None if not a regular file or if we’re unable to use md5 (Common for FIPS-140 compliant systems).,The default of this option changed from C(yes) to C(no) in Ansible 2.5 and will be removed altogether in Ansible 2.9.,Use C(get_checksum=true) with C(checksum_algorithm=md5) to return an md5 hash under the C(checksum) return value.
21 |
# File 'lib/ansible/ruby/modules/generated/files/stat.rb', line 21 attribute :get_md5 |
#get_mime ⇒ :yes, ...
Returns Use file magic and return data about the nature of the file. this uses the ‘file’ utility found on most Linux/Unix systems.,This will add both ‘mime_type` and ’charset’ fields to the return, if possible.,In 2.3 this option changed from ‘mime’ to ‘get_mime’ and the default changed to ‘Yes’.
33 |
# File 'lib/ansible/ruby/modules/generated/files/stat.rb', line 33 attribute :get_mime |
#path ⇒ String
Returns The full path of the file/object to get the facts of.
13 |
# File 'lib/ansible/ruby/modules/generated/files/stat.rb', line 13 attribute :path |