Class: Ansible::Ruby::Modules::Interfaces_file
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::Interfaces_file
- Defined in:
- lib/ansible/ruby/modules/generated/system/interfaces_file.rb
Overview
Manage (add, remove, change) individual interface options in an interfaces-style file without having to manage the file as a whole with, say, M(template) or M(assemble). Interface has to be presented in a file. Read information about interfaces from interfaces-styled files
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 interfaces file.
-
#iface ⇒ String?
Name of the interface, required for value changes or option remove.
-
#option ⇒ String?
Name of the option, required for value changes or option remove.
-
#state ⇒ :present, ...
If set to C(absent) the option or section will be removed if present instead of created.
-
#value ⇒ Integer?
If I(option) is not presented for the I(interface) and I(state) is C(present) option will be added.
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.
29 |
# File 'lib/ansible/ruby/modules/generated/system/interfaces_file.rb', line 29 attribute :backup |
#dest ⇒ String?
Returns Path to the interfaces file.
13 |
# File 'lib/ansible/ruby/modules/generated/system/interfaces_file.rb', line 13 attribute :dest |
#iface ⇒ String?
Returns Name of the interface, required for value changes or option remove.
17 |
# File 'lib/ansible/ruby/modules/generated/system/interfaces_file.rb', line 17 attribute :iface |
#option ⇒ String?
Returns Name of the option, required for value changes or option remove.
21 |
# File 'lib/ansible/ruby/modules/generated/system/interfaces_file.rb', line 21 attribute :option |
#state ⇒ :present, ...
Returns If set to C(absent) the option or section will be removed if present instead of created.
33 |
# File 'lib/ansible/ruby/modules/generated/system/interfaces_file.rb', line 33 attribute :state |
#value ⇒ Integer?
Returns If I(option) is not presented for the I(interface) and I(state) is C(present) option will be added. If I(option) already exists and is not C(pre-up), C(up), C(post-up) or C(down), it’s value will be updated. C(pre-up), C(up), C(post-up) and C(down) options can’t be updated, only adding new options, removing existing ones or cleaning the whole option set are supported.
25 |
# File 'lib/ansible/ruby/modules/generated/system/interfaces_file.rb', line 25 attribute :value |