Skip to content

Latest commit

 

History

History
190 lines (160 loc) · 8.97 KB

comware_vrrp_module.rst

File metadata and controls

190 lines (160 loc) · 8.97 KB

comware_vrrp

Added in version 1.0

Manage VRRP configurations on a Comware v7 deviceauthor:hanyangyang

parameter required default choices comments
vrid yes VRRP group ID number
interface yes Full name of the Layer 3 interface
vip no Virtual IP to assign within the group
priority no VRRP priority for the device
preempt no
  • true
  • false
Determine preempt mode for the device
auth_mode no
  • simple
  • md5
authentication mode for vrrp
key_type no
  • cipher
  • plain
Type of key, i.e. cipher or clear text
key no cipher or clear text string
delay no Configure preemption delay time
track no Configure the track entry specified for monitoring.
switch no when the status of the monitored track item changes to negative, if the router is in backup status in the backup group, it will immediately switch to master router
state no present
  • present
  • absent
  • shutdown
  • undoshutdown
Desired state for the interface configuration
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/


# ensure vrid and vrip are configured
- comware_vrrp: vrid=100 vip=100.100.100.1 interface=Vlan-interface100 username={{ username }} password={{ password }} hostname={{ inventory_hostname }}

# ensure vrid 100 is shutdown
- comware_vrrp: vrid=100 interface=vlan100 state=shutdown username={{ username }} password={{ password }} hostname={{ inventory_hostname }}

# simple auth w/  plain text key
- comware_vrrp: vrid=100 interface=vlan100 auth_mode=simple key_type=plain key=testkey username={{ username }} password={{ password }} hostname={{ inventory_hostname }}

# md5 auth w/ cipher
- comware_vrrp: vrid=100 interface=vlan100 auth_mode=md5 key_type=cipher key='$c$3$d+Pc2DO3clxSA2tC6pe3UBzDEDl1dkE+voI=' username={{ username }} password={{ password }} hostname={{ inventory_hostname }}

# ensure vrid 100 on vlan 100 is removed
- comware_vrrp: vrid=100 interface=vlan100 state=absent username={{ username }} password={{ password }} hostname={{ inventory_hostname }}

# auth mode simple
- comware_vrrp: vrid=100 vip=100.100.100.1 interface=HundredGigE1/0/27 auth_mode=simple key_type=cipher key=123456  username={{ username }} password={{ password }} hostname={{ inventory_hostname }}

# vrrp delay track & switch
- comware_vrrp: vrid=100 vip=100.100.100.1 interface=HundredGigE1/0/27 delay=20  track=1024 switch=10.10.10.1  username={{ username }} password={{ password }} hostname={{ inventory_hostname }}

Note

When state is set to absent, the vrrp group for a specificinterface will be removed (if it exists)When state is set to shutdown, the vrrp group for a specificinterface will be shutdown. undoshutdown reverses this operationWhen sending a text password, the module is not idempotentbecause a hash is calculated on the switch. sending a cipherthat matches the one configured is idempotent.