Class: Ansible::Ruby::Modules::Nmcli
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::Nmcli
- Defined in:
- lib/ansible/ruby/modules/generated/net_tools/nmcli.rb
Overview
Manage the network devices. Create, modify and manage various connection and device type e.g., ethernet, teams, bonds, vlans etc. On CentOS and Fedora like systems, install dependencies as ‘yum/dnf install -y python-gobject NetworkManager-glib’ On Ubuntu and Debian like systems, install dependencies as ‘apt-get install -y libnm-glib-dev’
Instance Method Summary collapse
-
#ageingtime ⇒ Integer?
This is only used with bridge - [ageing-time <0-1000000>] the Ethernet MAC address aging time, in seconds.
-
#arp_interval ⇒ Object?
This is only used with bond - ARP interval.
-
#arp_ip_target ⇒ Object?
This is only used with bond - ARP IP target.
-
#autoconnect ⇒ Boolean?
Whether the connection should start on boot.,Whether the connection profile can be automatically activated.
-
#conn_name ⇒ String
Where conn_name will be the name used to call the connection.
-
#dhcp_client_id ⇒ Object?
DHCP Client Identifier sent to the DHCP server.
-
#dns4 ⇒ Object?
A list of upto 3 dns servers, ipv4 format e.g.
-
#dns4_search ⇒ Object?
A list of DNS search domains.
-
#dns6 ⇒ Object?
A list of upto 3 dns servers, ipv6 format e.g.
-
#dns6_search ⇒ Object?
A list of DNS search domains.
-
#downdelay ⇒ Object?
This is only used with bond - downdelay.
-
#egress ⇒ Object?
This is only used with VLAN - VLAN egress priority mapping.
-
#flags ⇒ Object?
This is only used with VLAN - flags.
-
#forwarddelay ⇒ Integer?
This is only used with bridge - [forward-delay <2-30>] STP forwarding delay, in seconds.
-
#gw4 ⇒ String?
The IPv4 gateway for this interface using this format ie: “192.0.2.1”.
-
#gw6 ⇒ Object?
The IPv6 gateway for this interface using this format ie: “2001:db8::1”.
-
#hairpin ⇒ :yes, ...
This is only used with ‘bridge-slave’ - ‘hairpin mode’ for the slave, which allows frames to be sent back out through the slave the frame was received on.
-
#hellotime ⇒ Integer?
This is only used with bridge - [hello-time <1-10>] STP hello time, in seconds.
-
#ifname ⇒ String?
Where IFNAME will be the what we call the interface name.,interface to bind the connection to.
-
#ingress ⇒ Object?
This is only used with VLAN - VLAN ingress priority mapping.
-
#ip4 ⇒ String?
The IPv4 address to this interface using this format ie: “192.0.2.24/24”.
-
#ip6 ⇒ Object?
The IPv6 address to this interface using this format ie: “abbe::cafe”.
-
#mac ⇒ Object?
This is only used with bridge - MAC address of the bridge (note: this requires a recent kernel feature, originally introduced in 3.15 upstream kernel)rn.
-
#master ⇒ Object?
Master <master (ifname, or connection UUID or conn_name) of bridge, team, bond master connection profile.
-
#maxage ⇒ Integer?
This is only used with bridge - [max-age <6-42>] STP maximum message age, in seconds.
-
#miimon ⇒ Integer?
This is only used with bond - miimon.
-
#mode ⇒ :"balance-rr", ...
This is the type of device or network connection that you wish to create for a bond, team or bridge.
-
#mtu ⇒ Integer?
The connection MTU, e.g.
-
#path_cost ⇒ Integer?
This is only used with ‘bridge-slave’ - [<1-65535>] - STP port cost for destinations via this slave.
-
#primary ⇒ Object?
This is only used with bond and is the primary interface name (for “active-backup” mode), this is the usually the ‘ifname’.
-
#priority ⇒ Integer?
This is only used with ‘bridge’ - sets STP priority.
-
#slavepriority ⇒ Integer?
This is only used with ‘bridge-slave’ - [<0-63>] - STP priority of this slave.
-
#state ⇒ :present, :absent
Whether the device should exist or not, taking action if the state is different from what is stated.
-
#stp ⇒ Symbol?
This is only used with bridge and controls whether Spanning Tree Protocol (STP) is enabled for this bridge.
-
#type ⇒ :ethernet, ...
This is the type of device or network connection that you wish to create or modify.,type C(generic) is added in version 2.5.
-
#updelay ⇒ Object?
This is only used with bond - updelay.
-
#vlandev ⇒ Object?
This is only used with VLAN - parent device this VLAN is on, can use ifname.
-
#vlanid ⇒ Object?
This is only used with VLAN - VLAN ID in range <0-4095>.
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
#ageingtime ⇒ Integer?
Returns This is only used with bridge - [ageing-time <0-1000000>] the Ethernet MAC address aging time, in seconds.
113 |
# File 'lib/ansible/ruby/modules/generated/net_tools/nmcli.rb', line 113 attribute :ageingtime |
#arp_interval ⇒ Object?
Returns This is only used with bond - ARP interval.
87 |
# File 'lib/ansible/ruby/modules/generated/net_tools/nmcli.rb', line 87 attribute :arp_interval |
#arp_ip_target ⇒ Object?
Returns This is only used with bond - ARP IP target.
90 |
# File 'lib/ansible/ruby/modules/generated/net_tools/nmcli.rb', line 90 attribute :arp_ip_target |
#autoconnect ⇒ Boolean?
Returns Whether the connection should start on boot.,Whether the connection profile can be automatically activated.
18 |
# File 'lib/ansible/ruby/modules/generated/net_tools/nmcli.rb', line 18 attribute :autoconnect |
#conn_name ⇒ String
Returns Where conn_name will be the name used to call the connection. when not provided a default name is generated: <type>[-<num>].
22 |
# File 'lib/ansible/ruby/modules/generated/net_tools/nmcli.rb', line 22 attribute :conn_name |
#dhcp_client_id ⇒ Object?
Returns DHCP Client Identifier sent to the DHCP server.
71 |
# File 'lib/ansible/ruby/modules/generated/net_tools/nmcli.rb', line 71 attribute :dhcp_client_id |
#dns4 ⇒ Object?
Returns A list of upto 3 dns servers, ipv4 format e.g. To add two IPv4 DNS server addresses: “192.0.2.53 198.51.100.53”.
49 |
# File 'lib/ansible/ruby/modules/generated/net_tools/nmcli.rb', line 49 attribute :dns4 |
#dns4_search ⇒ Object?
Returns A list of DNS search domains.
52 |
# File 'lib/ansible/ruby/modules/generated/net_tools/nmcli.rb', line 52 attribute :dns4_search |
#dns6 ⇒ Object?
Returns A list of upto 3 dns servers, ipv6 format e.g. To add two IPv6 DNS server addresses: “2001:4860:4860::8888 2001:4860:4860::8844”.
61 |
# File 'lib/ansible/ruby/modules/generated/net_tools/nmcli.rb', line 61 attribute :dns6 |
#dns6_search ⇒ Object?
Returns A list of DNS search domains.
64 |
# File 'lib/ansible/ruby/modules/generated/net_tools/nmcli.rb', line 64 attribute :dns6_search |
#downdelay ⇒ Object?
Returns This is only used with bond - downdelay.
81 |
# File 'lib/ansible/ruby/modules/generated/net_tools/nmcli.rb', line 81 attribute :downdelay |
#egress ⇒ Object?
Returns This is only used with VLAN - VLAN egress priority mapping.
144 |
# File 'lib/ansible/ruby/modules/generated/net_tools/nmcli.rb', line 144 attribute :egress |
#flags ⇒ Object?
Returns This is only used with VLAN - flags.
138 |
# File 'lib/ansible/ruby/modules/generated/net_tools/nmcli.rb', line 138 attribute :flags |
#forwarddelay ⇒ Integer?
Returns This is only used with bridge - [forward-delay <2-30>] STP forwarding delay, in seconds.
101 |
# File 'lib/ansible/ruby/modules/generated/net_tools/nmcli.rb', line 101 attribute :forwarddelay |
#gw4 ⇒ String?
Returns The IPv4 gateway for this interface using this format ie: “192.0.2.1”.
45 |
# File 'lib/ansible/ruby/modules/generated/net_tools/nmcli.rb', line 45 attribute :gw4 |
#gw6 ⇒ Object?
Returns The IPv6 gateway for this interface using this format ie: “2001:db8::1”.
58 |
# File 'lib/ansible/ruby/modules/generated/net_tools/nmcli.rb', line 58 attribute :gw6 |
#hairpin ⇒ :yes, ...
Returns This is only used with ‘bridge-slave’ - ‘hairpin mode’ for the slave, which allows frames to be sent back out through the slave the frame was received on.
128 |
# File 'lib/ansible/ruby/modules/generated/net_tools/nmcli.rb', line 128 attribute :hairpin |
#hellotime ⇒ Integer?
Returns This is only used with bridge - [hello-time <1-10>] STP hello time, in seconds.
105 |
# File 'lib/ansible/ruby/modules/generated/net_tools/nmcli.rb', line 105 attribute :hellotime |
#ifname ⇒ String?
Returns Where IFNAME will be the what we call the interface name.,interface to bind the connection to. The connection will only be applicable to this interface name.,A special value of “*” can be used for interface-independent connections.,The ifname argument is mandatory for all connection types except bond, team, bridge and vlan.
26 |
# File 'lib/ansible/ruby/modules/generated/net_tools/nmcli.rb', line 26 attribute :ifname |
#ingress ⇒ Object?
Returns This is only used with VLAN - VLAN ingress priority mapping.
141 |
# File 'lib/ansible/ruby/modules/generated/net_tools/nmcli.rb', line 141 attribute :ingress |
#ip4 ⇒ String?
Returns The IPv4 address to this interface using this format ie: “192.0.2.24/24”.
41 |
# File 'lib/ansible/ruby/modules/generated/net_tools/nmcli.rb', line 41 attribute :ip4 |
#ip6 ⇒ Object?
Returns The IPv6 address to this interface using this format ie: “abbe::cafe”.
55 |
# File 'lib/ansible/ruby/modules/generated/net_tools/nmcli.rb', line 55 attribute :ip6 |
#mac ⇒ Object?
Returns This is only used with bridge - MAC address of the bridge (note: this requires a recent kernel feature, originally introduced in 3.15 upstream kernel)rn.
117 |
# File 'lib/ansible/ruby/modules/generated/net_tools/nmcli.rb', line 117 attribute :mac |
#master ⇒ Object?
Returns master <master (ifname, or connection UUID or conn_name) of bridge, team, bond master connection profile.
38 |
# File 'lib/ansible/ruby/modules/generated/net_tools/nmcli.rb', line 38 attribute :master |
#maxage ⇒ Integer?
Returns This is only used with bridge - [max-age <6-42>] STP maximum message age, in seconds.
109 |
# File 'lib/ansible/ruby/modules/generated/net_tools/nmcli.rb', line 109 attribute :maxage |
#miimon ⇒ Integer?
Returns This is only used with bond - miimon.
77 |
# File 'lib/ansible/ruby/modules/generated/net_tools/nmcli.rb', line 77 attribute :miimon |
#mode ⇒ :"balance-rr", ...
Returns This is the type of device or network connection that you wish to create for a bond, team or bridge.
34 |
# File 'lib/ansible/ruby/modules/generated/net_tools/nmcli.rb', line 34 attribute :mode |
#mtu ⇒ Integer?
Returns The connection MTU, e.g. 9000. This can’t be applied when creating the interface and is done once the interface has been created.,Can be used when modifying Team, VLAN, Ethernet (Future plans to implement wifi, pppoe, infiniband).
67 |
# File 'lib/ansible/ruby/modules/generated/net_tools/nmcli.rb', line 67 attribute :mtu |
#path_cost ⇒ Integer?
Returns This is only used with ‘bridge-slave’ - [<1-65535>] - STP port cost for destinations via this slave.
124 |
# File 'lib/ansible/ruby/modules/generated/net_tools/nmcli.rb', line 124 attribute :path_cost |
#primary ⇒ Object?
Returns This is only used with bond and is the primary interface name (for “active-backup” mode), this is the usually the ‘ifname’.
74 |
# File 'lib/ansible/ruby/modules/generated/net_tools/nmcli.rb', line 74 attribute :primary |
#priority ⇒ Integer?
Returns This is only used with ‘bridge’ - sets STP priority.
97 |
# File 'lib/ansible/ruby/modules/generated/net_tools/nmcli.rb', line 97 attribute :priority |
#slavepriority ⇒ Integer?
Returns This is only used with ‘bridge-slave’ - [<0-63>] - STP priority of this slave.
120 |
# File 'lib/ansible/ruby/modules/generated/net_tools/nmcli.rb', line 120 attribute :slavepriority |
#state ⇒ :present, :absent
Returns Whether the device should exist or not, taking action if the state is different from what is stated.
14 |
# File 'lib/ansible/ruby/modules/generated/net_tools/nmcli.rb', line 14 attribute :state |
#stp ⇒ Symbol?
Returns This is only used with bridge and controls whether Spanning Tree Protocol (STP) is enabled for this bridge.
93 |
# File 'lib/ansible/ruby/modules/generated/net_tools/nmcli.rb', line 93 attribute :stp |
#type ⇒ :ethernet, ...
Returns This is the type of device or network connection that you wish to create or modify.,type C(generic) is added in version 2.5.
30 |
# File 'lib/ansible/ruby/modules/generated/net_tools/nmcli.rb', line 30 attribute :type |
#updelay ⇒ Object?
Returns This is only used with bond - updelay.
84 |
# File 'lib/ansible/ruby/modules/generated/net_tools/nmcli.rb', line 84 attribute :updelay |
#vlandev ⇒ Object?
Returns This is only used with VLAN - parent device this VLAN is on, can use ifname.
135 |
# File 'lib/ansible/ruby/modules/generated/net_tools/nmcli.rb', line 135 attribute :vlandev |
#vlanid ⇒ Object?
Returns This is only used with VLAN - VLAN ID in range <0-4095>.
132 |
# File 'lib/ansible/ruby/modules/generated/net_tools/nmcli.rb', line 132 attribute :vlanid |