Class: Ansible::Ruby::Modules::Blockinfile
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::Blockinfile
- Defined in:
- lib/ansible/ruby/modules/generated/extras/files/blockinfile.rb
Overview
This module will insert/update/remove a block of multi-line text surrounded by customizable marker lines.
Instance Method Summary collapse
-
#backup ⇒ :yes, ...
Create a backup file including the timestamp information so you can get the original file back if you somehow clobbered it incorrectly.
-
#block ⇒ String?
The text to insert inside the marker lines.
-
#create ⇒ :yes, ...
Create a new file if it doesn’t exist.
-
#dest ⇒ String
The file to modify.
-
#follow ⇒ :yes, ...
This flag indicates that filesystem links, if they exist, should be followed.
-
#insertafter ⇒ :EOF, ...
If specified, the block will be inserted after the last match of specified regular expression.
-
#insertbefore ⇒ :BOF, ...
If specified, the block will be inserted before the last match of specified regular expression.
-
#marker ⇒ String?
The marker line template.
-
#state ⇒ :present, ...
Whether the block should be there or not.
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
#backup ⇒ :yes, ...
Returns Create a backup file including the timestamp information so you can get the original file back if you somehow clobbered it incorrectly.
39 |
# File 'lib/ansible/ruby/modules/generated/extras/files/blockinfile.rb', line 39 attribute :backup |
#block ⇒ String?
Returns The text to insert inside the marker lines. If it’s missing or an empty string, the block will be removed as if C(state) were specified to C(absent).
23 |
# File 'lib/ansible/ruby/modules/generated/extras/files/blockinfile.rb', line 23 attribute :block |
#create ⇒ :yes, ...
Returns Create a new file if it doesn’t exist.
35 |
# File 'lib/ansible/ruby/modules/generated/extras/files/blockinfile.rb', line 35 attribute :create |
#dest ⇒ String
Returns The file to modify.
11 |
# File 'lib/ansible/ruby/modules/generated/extras/files/blockinfile.rb', line 11 attribute :dest |
#follow ⇒ :yes, ...
Returns This flag indicates that filesystem links, if they exist, should be followed.
43 |
# File 'lib/ansible/ruby/modules/generated/extras/files/blockinfile.rb', line 43 attribute :follow |
#insertafter ⇒ :EOF, ...
Returns If specified, the block will be inserted after the last match of specified regular expression. A special value is available; C(EOF) for inserting the block at the end of the file. If specified regular expresion has no matches, C(EOF) will be used instead.
27 |
# File 'lib/ansible/ruby/modules/generated/extras/files/blockinfile.rb', line 27 attribute :insertafter |
#insertbefore ⇒ :BOF, ...
Returns If specified, the block will be inserted before the last match of specified regular expression. A special value is available; C(BOF) for inserting the block at the beginning of the file. If specified regular expresion has no matches, the block will be inserted at the end of the file.
31 |
# File 'lib/ansible/ruby/modules/generated/extras/files/blockinfile.rb', line 31 attribute :insertbefore |
#marker ⇒ String?
Returns The marker line template. “mark” will be replaced with “BEGIN” or “END”.
19 |
# File 'lib/ansible/ruby/modules/generated/extras/files/blockinfile.rb', line 19 attribute :marker |
#state ⇒ :present, ...
Returns Whether the block should be there or not.
15 |
# File 'lib/ansible/ruby/modules/generated/extras/files/blockinfile.rb', line 15 attribute :state |