Class: Ansible::Ruby::Modules::Interfaces_file

Inherits:
Base show all
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

Methods inherited from Base

#ansible_name, #to_h

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.

Returns:

  • (:yes, :no, nil)

    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

#destString?

Returns Path to the interfaces file.

Returns:

  • (String, nil)

    Path to the interfaces file



13
# File 'lib/ansible/ruby/modules/generated/system/interfaces_file.rb', line 13

attribute :dest

#ifaceString?

Returns Name of the interface, required for value changes or option remove.

Returns:

  • (String, nil)

    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

#optionString?

Returns Name of the option, required for value changes or option remove.

Returns:

  • (String, nil)

    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.

Returns:

  • (:present, :absent, nil)

    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

#valueInteger?

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.

Returns:

  • (Integer, nil)

    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