Class: Ansible::Ruby::Modules::File

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

Instance Method Summary collapse

Methods inherited from Base

#to_h

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

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

Constructor Details

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

Instance Method Details

#follow:yes, ...

Returns This flag indicates that filesystem links, if they exist, should be followed.

Returns:

  • (:yes, :no, nil)

    This flag indicates that filesystem links, if they exist, should be followed.



30
# File 'lib/ansible/ruby/modules/generated/core/files/file.rb', line 30

attribute :follow

#force:yes, ...

Returns force the creation of the symlinks in two cases: the source file does not exist (but will appear later); the destination exists and is a file (so, we need to unlink the “path” file and create symlink to the “src” file in place of it).

Returns:

  • (:yes, :no, nil)

    force the creation of the symlinks in two cases: the source file does not exist (but will appear later); the destination exists and is a file (so, we need to unlink the “path” file and create symlink to the “src” file in place of it).



26
# File 'lib/ansible/ruby/modules/generated/core/files/file.rb', line 26

attribute :force

#pathObject

Returns path to the file being managed. Aliases: I(dest), I(name).

Returns:

  • (Object)

    path to the file being managed. Aliases: I(dest), I(name)



10
# File 'lib/ansible/ruby/modules/generated/core/files/file.rb', line 10

attribute :path

#recurse:yes, ...

Returns recursively set the specified file attributes (applies only to state=directory).

Returns:

  • (:yes, :no, nil)

    recursively set the specified file attributes (applies only to state=directory)



22
# File 'lib/ansible/ruby/modules/generated/core/files/file.rb', line 22

attribute :recurse

#srcString?

Returns path of the file to link to (applies only to C(state=link)). Will accept absolute, relative and nonexisting paths. Relative paths are not expanded.

Returns:

  • (String, nil)

    path of the file to link to (applies only to C(state=link)). Will accept absolute, relative and nonexisting paths. Relative paths are not expanded.



18
# File 'lib/ansible/ruby/modules/generated/core/files/file.rb', line 18

attribute :src

#state:file, ...

Returns If C(directory), all immediate subdirectories will be created if they do not exist, since 1.7 they will be created with the supplied permissions. If C(file), the file will NOT be created if it does not exist, see the M(copy) or M(template) module if you want that behavior. If C(link), the symbolic link will be created or changed. Use C(hard) for hardlinks. If C(absent), directories will be recursively deleted, and files or symlinks will be unlinked. If C(touch) (new in 1.4), an empty file will be created if the C(path) does not exist, while an existing file or directory will receive updated file access and modification times (similar to the way ‘touch` works from the command line).

Returns:

  • (:file, :link, :directory, :hard, :touch, :absent, nil)

    If C(directory), all immediate subdirectories will be created if they do not exist, since 1.7 they will be created with the supplied permissions. If C(file), the file will NOT be created if it does not exist, see the M(copy) or M(template) module if you want that behavior. If C(link), the symbolic link will be created or changed. Use C(hard) for hardlinks. If C(absent), directories will be recursively deleted, and files or symlinks will be unlinked. If C(touch) (new in 1.4), an empty file will be created if the C(path) does not exist, while an existing file or directory will receive updated file access and modification times (similar to the way ‘touch` works from the command line).



14
# File 'lib/ansible/ruby/modules/generated/core/files/file.rb', line 14

attribute :state