Class: Ansible::Ruby::Modules::Blockinfile
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::Blockinfile
- Defined in:
- lib/ansible/ruby/modules/generated/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.
-
#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.
-
#marker_begin ⇒ String?
This will be inserted at mark in the opening ansible block marker.
-
#marker_end ⇒ String?
This will be inserted at mark in the closing ansible block marker.
-
#path ⇒ String
The file to modify.,Before 2.3 this option was only usable as I(dest), I(destfile) and I(name).
-
#state ⇒ :absent, ...
Whether the block should be there or not.
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
#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.
40 |
# File 'lib/ansible/ruby/modules/generated/files/blockinfile.rb', line 40 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).
24 |
# File 'lib/ansible/ruby/modules/generated/files/blockinfile.rb', line 24 attribute :block |
#create ⇒ :yes, ...
Returns Create a new file if it doesn’t exist.
36 |
# File 'lib/ansible/ruby/modules/generated/files/blockinfile.rb', line 36 attribute :create |
#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 expression has no matches, C(EOF) will be used instead.
28 |
# File 'lib/ansible/ruby/modules/generated/files/blockinfile.rb', line 28 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 expression has no matches, the block will be inserted at the end of the file.
32 |
# File 'lib/ansible/ruby/modules/generated/files/blockinfile.rb', line 32 attribute :insertbefore |
#marker ⇒ String?
Returns The marker line template. “mark” will be replaced with the values in marker_begin (default=“BEGIN”) and marker_end (default=“END”).
20 |
# File 'lib/ansible/ruby/modules/generated/files/blockinfile.rb', line 20 attribute :marker |
#marker_begin ⇒ String?
Returns This will be inserted at mark in the opening ansible block marker.
44 |
# File 'lib/ansible/ruby/modules/generated/files/blockinfile.rb', line 44 attribute :marker_begin |
#marker_end ⇒ String?
Returns This will be inserted at mark in the closing ansible block marker.
48 |
# File 'lib/ansible/ruby/modules/generated/files/blockinfile.rb', line 48 attribute :marker_end |
#path ⇒ String
Returns The file to modify.,Before 2.3 this option was only usable as I(dest), I(destfile) and I(name).
12 |
# File 'lib/ansible/ruby/modules/generated/files/blockinfile.rb', line 12 attribute :path |
#state ⇒ :absent, ...
Returns Whether the block should be there or not.
16 |
# File 'lib/ansible/ruby/modules/generated/files/blockinfile.rb', line 16 attribute :state |