Added in version 1.8
Manage IPv4/IPv6 addresses on interfaces
parameter | required | default | choices | comments |
---|---|---|---|---|
name | yes | Full name of the interface | ||
addr | yes | The IPv4 or IPv6 address of the interface | ||
mask | yes | The network mask, in dotted decimal or prefix length notation. If using IPv6, only prefix length is supported. | ||
version | no | v4 | v4 for IPv4, v6 for IPv6 | |
state | no | present |
|
Desired state of the switchport |
hostname | yes | IP Address or hostname of the Comware v7 device that has NETCONF enabled | ||
username | yes | Username used to login to the switch | ||
password | yes | Password used to login to the switch | ||
port | no | 830 | NETCONF port number | |
look_for_keys | no | False | Whether searching for discoverable private key files in ~/.ssh/ |
# Basic IPv4 config - comware_ipinterface: name=FortyGigE1/0/3 addr=192.168.3.5 mask=255.255.255.0 username={{ username }} password={{ password }} hostname={{ inventory_hostname }} # Basic IPv6 config - comware_ipinterface: version=v6 name=FortyGigE1/0/3 addr=2001:DB8::1 mask=10 username={{ username }} password={{ password }} hostname={{ inventory_hostname }}
Note
If the interface is not configured to be a layer 3 port,the module will fail and the user should use the interfacemodule to convert the interface with type=routedIf state=absent, the specified IP address will be removed from the interface.If the existing IP address doesn't match the specified,the existing will not be removed.