Class: Ansible::Ruby::Modules::Win_file

Inherits:
Base show all
Defined in:
lib/ansible/ruby/modules/generated/windows/win_file.rb

Overview

Creates (empty) files, updates file modification stamps of existing files, and can create or remove directories. Unlike M(file), does not modify ownership, permissions or manipulate links. For non-Windows targets, use the M(file) 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

#pathString

Returns Path to the file being managed.

Returns:

  • (String)

    Path to the file being managed.



14
# File 'lib/ansible/ruby/modules/generated/windows/win_file.rb', line 14

attribute :path

#state:absent, ...

Returns If C(directory), all immediate subdirectories will be created if they do not exist.,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(absent), directories will be recursively deleted, and files will be removed.,If C(touch), 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 C(touch) works from the command line).

Returns:

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

    If C(directory), all immediate subdirectories will be created if they do not exist.,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(absent), directories will be recursively deleted, and files will be removed.,If C(touch), 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 C(touch) works from the command line).



18
# File 'lib/ansible/ruby/modules/generated/windows/win_file.rb', line 18

attribute :state