Class: Ansible::Ruby::Modules::Ini_file
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::Ini_file
- Defined in:
- lib/ansible/ruby/modules/generated/core/files/ini_file.rb
Overview
Manage (add, remove, change) individual settings in an INI-style file without having to manage the file as a whole with, say, M(template) or M(assemble). Adds missing sections if they don’t exist. Before version 2.0, comments are discarded when the source file is read, and therefore will not show up in the destination file.
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.
-
#dest ⇒ String
Path to the INI-style file; this file is created if required.
-
#no_extra_spaces ⇒ Boolean?
Do not insert spaces before and after ‘=’ symbol.
-
#option ⇒ String?
If set (required for changing a I(value)), this is the name of the option.,May be omitted if adding/removing a whole I(section).
-
#others ⇒ Object?
All arguments accepted by the M(file) module also work here.
-
#section ⇒ String
Section name in INI file.
-
#state ⇒ :present, ...
If set to C(absent) the option or section will be removed if present instead of created.
-
#value ⇒ String?
The string value to be associated with an I(option).
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.
28 |
# File 'lib/ansible/ruby/modules/generated/core/files/ini_file.rb', line 28 attribute :backup |
#dest ⇒ String
Returns Path to the INI-style file; this file is created if required.
12 |
# File 'lib/ansible/ruby/modules/generated/core/files/ini_file.rb', line 12 attribute :dest |
#no_extra_spaces ⇒ Boolean?
Returns do not insert spaces before and after ‘=’ symbol.
39 |
# File 'lib/ansible/ruby/modules/generated/core/files/ini_file.rb', line 39 attribute :no_extra_spaces |
#option ⇒ String?
Returns if set (required for changing a I(value)), this is the name of the option.,May be omitted if adding/removing a whole I(section).
20 |
# File 'lib/ansible/ruby/modules/generated/core/files/ini_file.rb', line 20 attribute :option |
#others ⇒ Object?
Returns all arguments accepted by the M(file) module also work here.
32 |
# File 'lib/ansible/ruby/modules/generated/core/files/ini_file.rb', line 32 attribute :others |
#section ⇒ String
Returns Section name in INI file. This is added if C(state=present) automatically when a single value is being set.
16 |
# File 'lib/ansible/ruby/modules/generated/core/files/ini_file.rb', line 16 attribute :section |
#state ⇒ :present, ...
Returns If set to C(absent) the option or section will be removed if present instead of created.
35 |
# File 'lib/ansible/ruby/modules/generated/core/files/ini_file.rb', line 35 attribute :state |
#value ⇒ String?
Returns the string value to be associated with an I(option). May be omitted when removing an I(option).
24 |
# File 'lib/ansible/ruby/modules/generated/core/files/ini_file.rb', line 24 attribute :value |