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/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. Since version 2.3, this module adds missing ending newlines to files to keep in line with the POSIX standard, even when no other modifications need to be applied.
Instance Method Summary collapse
-
#allow_no_value ⇒ Symbol?
Allow option without value and without ‘=’ symbol.
-
#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, ...
If set to ‘no’, the module will fail if the file does not already exist.
-
#no_extra_spaces ⇒ :yes, ...
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.
-
#path ⇒ String
Path to the INI-style file; this file is created if required.,Before 2.3 this option was only usable as I(dest).
-
#section ⇒ String
Section name in INI file.
-
#state ⇒ :absent, ...
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
#allow_no_value ⇒ Symbol?
49 |
# File 'lib/ansible/ruby/modules/generated/files/ini_file.rb', line 49 attribute :allow_no_value |
#backup ⇒ :yes, ...
30 |
# File 'lib/ansible/ruby/modules/generated/files/ini_file.rb', line 30 attribute :backup |
#create ⇒ :yes, ...
45 |
# File 'lib/ansible/ruby/modules/generated/files/ini_file.rb', line 45 attribute :create |
#no_extra_spaces ⇒ :yes, ...
41 |
# File 'lib/ansible/ruby/modules/generated/files/ini_file.rb', line 41 attribute :no_extra_spaces |
#option ⇒ String?
22 |
# File 'lib/ansible/ruby/modules/generated/files/ini_file.rb', line 22 attribute :option |
#others ⇒ Object?
34 |
# File 'lib/ansible/ruby/modules/generated/files/ini_file.rb', line 34 attribute :others |
#path ⇒ String
14 |
# File 'lib/ansible/ruby/modules/generated/files/ini_file.rb', line 14 attribute :path |
#section ⇒ String
18 |
# File 'lib/ansible/ruby/modules/generated/files/ini_file.rb', line 18 attribute :section |
#state ⇒ :absent, ...
37 |
# File 'lib/ansible/ruby/modules/generated/files/ini_file.rb', line 37 attribute :state |
#value ⇒ String?
26 |
# File 'lib/ansible/ruby/modules/generated/files/ini_file.rb', line 26 attribute :value |