Class: Ansible::Ruby::Modules::Win_lineinfile
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::Win_lineinfile
- Defined in:
- lib/ansible/ruby/modules/generated/windows/win_lineinfile.rb
Overview
This module will search a file for a line, and ensure that it is present or absent. This is primarily useful when you want to change a single line in a file only.
Instance Method Summary collapse
-
#backrefs ⇒ :yes, ...
Used with C(state=present).
-
#backup ⇒ :yes, ...
Create a backup file including the timestamp information so you can get the original file back if you somehow clobbered it incorrectly.
-
#create ⇒ :yes, ...
Used with C(state=present).
-
#encoding ⇒ String?
Specifies the encoding of the source text file to operate on (and thus what the output encoding will be).
-
#insertafter ⇒ :EOF, ...
Used with C(state=present).
-
#insertbefore ⇒ :BOF, ...
Used with C(state=present).
-
#line ⇒ String?
Required for C(state=present).
-
#newline ⇒ :unix, ...
Specifies the line separator style to use for the modified file.
-
#path ⇒ String
The path of the file to modify.,Note that the Windows path delimiter C() must be escaped as C(\) when the line is double quoted.,Before 2.3 this option was only usable as I(dest), I(destfile) and I(name).
-
#regexp ⇒ String?
The regular expression to look for in every line of the file.
-
#state ⇒ :absent, ...
Whether the line should be there or not.
-
#validate ⇒ Object?
Validation to run before copying into place.
Methods inherited from Base
Methods inherited from Ansible::Ruby::Models::Base
attr_option, attr_options, attribute, #initialize, remove_existing_validations, #to_h, validates
Constructor Details
This class inherits a constructor from Ansible::Ruby::Models::Base
Instance Method Details
#backrefs ⇒ :yes, ...
29 |
# File 'lib/ansible/ruby/modules/generated/windows/win_lineinfile.rb', line 29 attribute :backrefs |
#backup ⇒ :yes, ...
45 |
# File 'lib/ansible/ruby/modules/generated/windows/win_lineinfile.rb', line 45 attribute :backup |
#create ⇒ :yes, ...
41 |
# File 'lib/ansible/ruby/modules/generated/windows/win_lineinfile.rb', line 41 attribute :create |
#encoding ⇒ String?
52 |
# File 'lib/ansible/ruby/modules/generated/windows/win_lineinfile.rb', line 52 attribute :encoding |
#insertafter ⇒ :EOF, ...
33 |
# File 'lib/ansible/ruby/modules/generated/windows/win_lineinfile.rb', line 33 attribute :insertafter |
#insertbefore ⇒ :BOF, ...
37 |
# File 'lib/ansible/ruby/modules/generated/windows/win_lineinfile.rb', line 37 attribute :insertbefore |
#line ⇒ String?
25 |
# File 'lib/ansible/ruby/modules/generated/windows/win_lineinfile.rb', line 25 attribute :line |
#newline ⇒ :unix, ...
56 |
# File 'lib/ansible/ruby/modules/generated/windows/win_lineinfile.rb', line 56 attribute :newline |
#path ⇒ String
13 |
# File 'lib/ansible/ruby/modules/generated/windows/win_lineinfile.rb', line 13 attribute :path |
#regexp ⇒ String?
17 |
# File 'lib/ansible/ruby/modules/generated/windows/win_lineinfile.rb', line 17 attribute :regexp |
#state ⇒ :absent, ...
21 |
# File 'lib/ansible/ruby/modules/generated/windows/win_lineinfile.rb', line 21 attribute :state |
#validate ⇒ Object?
49 |
# File 'lib/ansible/ruby/modules/generated/windows/win_lineinfile.rb', line 49 attribute :validate |