arista.eos.eos_snmp_server module – Manages snmp_server resource module
Note
This module is part of the arista.eos collection (version 6.0.1).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install arista.eos
.
To use it in a playbook, specify: arista.eos.eos_snmp_server
.
New in arista.eos 3.2.0
Synopsis
This module configures and manages the attributes of snmp_server on Arista EOS platforms.
Parameters
Parameter |
Comments |
---|---|
SNMP server configuration. |
|
ipv4/ipv6 access_lists |
|
acl name |
|
ipv4/ipv6 Choices:
|
|
vrf name |
|
SNMP chassis identifier. |
|
Community name configuration. |
|
standard access_list name |
|
IPv6 access list name. |
|
Community name |
|
Only reads are permitted. Choices:
|
|
Read_write access Choices:
|
|
MIB view name |
|
Person to contact about the syste,. |
|
SNMPv3 engine ID configuration. |
|
Local SNMP agent |
|
Remote SNMP agent |
|
Hostname or IP address of remote SNMP notification host |
|
engine ID octet string |
|
The remote SNMP notification host’s UDP port number. |
|
Configure extension script to serve an OID range |
|
Use inefficient one_shot interface Choices:
|
|
Extension root oid |
|
script location |
|
SNMP USM group |
|
auth and privacy config. Valid when version = v3. Choices:
|
|
Specify a context to associate with the group |
|
SNMP group for the user |
|
View to restrict notifications |
|
View to restrict read access |
|
snmp security group version Choices:
|
|
View to restrict write access |
|
Notification destinations |
|
Hostname or IP address of SNMP notification host. |
|
Use SNMP inform messages. Choices:
|
|
Use SNMP trap messages Choices:
|
|
UDP destination port for notification messages. |
|
Community or user name. |
|
Notification message SNMP version. Choices:
|
|
Specify the VRF in which the host is configured |
|
Configure the source interface for SNMP notifications. |
|
The sysLocation string. |
|
Maximum number of notifications in the log |
|
when True Disable implementation of a group of objects |
|
dot1dTpFdbTable, dot1qTpFdbTable Choices:
|
|
ipCidrRouteTable, ipCidrRouteNumber, aristaFIBStats* Choices:
|
|
Configure QoS parameters. |
|
Set QOS_MIB counter update interval |
|
Maximum number of bytes in SNMP message (UDP/TCP payload) |
|
Enable snmpd transport layer protocol |
|
Enable traps to all configured recipients. |
|
Enable Bgp traps. If set to enabled , all the traps are set. |
|
arista_backward_transition Choices:
|
|
arista_established Choices:
|
|
backward_transition Choices:
|
|
All traps are set. Choices:
|
|
established. Choices:
|
|
Enable Bridge traps. If set to enabled , all the traps are set. |
|
arista_mac_age Choices:
|
|
arista_mac_learn Choices:
|
|
arista_mac_move Choices:
|
|
All traps are set. Choices:
|
|
Enable Capacity traps. If set to enabled , all the traps are set. |
|
arista_hardware_utilization_alert Choices:
|
|
All traps are set. Choices:
|
|
Enable Entity traps. If set to enabled , all the traps are set. |
|
arista_ent_sensor_alarm Choices:
|
|
All traps are set. Choices:
|
|
ent_config_change Choices:
|
|
ent_state_oper Choices:
|
|
ent_state_oper_disabled. Choices:
|
|
ent_state_oper_enabled. Choices:
|
|
Enable external alarm traps. If set to enabled , all the traps are set. |
|
arista_external_alarm_asserted_notif Choices:
|
|
arista_external_alarm_deasserted_notif Choices:
|
|
All traps are set. Choices:
|
|
Enable isis traps. If set to enabled , all the traps are set. |
|
adjacency_change Choices:
|
|
area_mismatch Choices:
|
|
attempt_to_exceed_max_sequence Choices:
|
|
authentication_type_failure. Choices:
|
|
database_overload Choices:
|
|
All traps are set. Choices:
|
|
own_lsp_purge Choices:
|
|
rejected_adjacency Choices:
|
|
sequence_number_skip. Choices:
|
|
Enable Lldp traps. If set to enabled , all the traps are set. |
|
All traps are set. Choices:
|
|
rem_tables_change Choices:
|
|
Enable mpls_ldp traps. If set to enabled , all the traps are set. |
|
All traps are set. Choices:
|
|
mpls_ldp_session_down Choices:
|
|
mpls_ldp_session_up Choices:
|
|
Enable msdp traps. If set to enabled , all the traps are set. |
|
backward_transition. Choices:
|
|
All traps are set. Choices:
|
|
established. Choices:
|
|
Enable Ospf traps. If set to enabled , all the traps are set. |
|
All traps are set. Choices:
|
|
if_auth_failure Choices:
|
|
if_config_error Choices:
|
|
if_state_change Choices:
|
|
nbr_state_change. Choices:
|
|
Enable Ospfv3 traps. If set to enabled , all the traps are set. |
|
All traps are set. Choices:
|
|
if_config_error Choices:
|
|
if_rx_bad_packet Choices:
|
|
if_state_change Choices:
|
|
Enable ospfv3NbrRestartHelperStatusChange trap Choices:
|
|
nbr_state_change. Choices:
|
|
Enable ospfv3NssaTranslatorStatusChange trap Choices:
|
|
restart_status_change Choices:
|
|
Enable Pim traps. If set to enabled , all the traps are set. |
|
All traps are set. Choices:
|
|
neighbor_loss Choices:
|
|
Enable snmp traps. If set to enabled , all the traps are set. |
|
authentication Choices:
|
|
All traps are set. Choices:
|
|
link_down Choices:
|
|
link_up Choices:
|
|
Enable snmpConfigManEvent traps. If set to enabled , all the traps are set. |
|
arista_config_man_event Choices:
|
|
All traps are set. Choices:
|
|
Enable switchover traps. If set to enabled , all the traps are set. |
|
arista_redundancy_switch_over_notif Choices:
|
|
All traps are set. Choices:
|
|
Enable test traps. If set to enabled , all the traps are set. |
|
arista_test_notification Choices:
|
|
All traps are set. Choices:
|
|
Enable vrrp traps. If set to enabled , all the traps are set. |
|
All traps are set. Choices:
|
|
vrrp Choices:
|
|
SNMP user configuration. |
|
User authentication settings |
|
algorithm for authentication |
|
authentication passphrase hex string |
|
algorithm for encryption. |
|
privacy passphrase hexstring |
|
SNMP group for the user. |
|
localized auth and privacy passphrases. |
|
algorithm for authentication |
|
authentication passphrase hex string |
|
algorithm for encryption. |
|
Engine id |
|
privacy passphrase hexstring |
|
System where an SNMPv3 user is hosted |
|
UDP port used by the remote SNMP system |
|
SNMP user name |
|
snmp security version Choices:
|
|
SNMPv2 MIB view configuration |
|
Action to be performed. Choices:
|
|
SNMP MIB name |
|
SNMP view name |
|
Specify the VRF in which the source address is used |
|
Configure the source interface for SNMP notifications |
|
vrf name. |
|
This option is used only with state parsed. The value of this option should be the output received from the EOS device by executing the command show running_config | section snmp_server. The state parsed reads the configuration from |
|
The state the configuration should be left in. The states replaced and overridden have identical behaviour for this module. Please refer to examples for more details. Choices:
|
Notes
Note
Tested against Arista EOS 4.24.6F
This module works with connection
network_cli
andhttpapi
.
Examples
# Using merged:
# Before State
# eos#show running-config | section snmp-server
# eos#
- name: merge given snmp_server configuration
arista.eos.eos_snmp_server:
config:
communities:
- name: "comm3"
acl_v6: "list1"
view: "view1"
- name: "comm4"
acl_v4: "list3"
view: "view1"
- name: "comm5"
acl_v4: "list4"
ro: True
contact: "admin"
engineid:
remote:
host: 1.1.1.1
id: "1234567"
groups:
- group: "group1"
version: "v1"
read: "view1"
- group: "group2"
version: "v3"
auth_privacy: "priv"
notify: "view1"
write: "view2"
hosts:
- host: "host02"
user: "user01"
udp_port: 23
version: "2c"
- host: "host01"
user: "user01"
udp_port: 23
version: "3 priv"
traps:
capacity:
arista_hardware_utilization_alert: True
bgp:
enabled: True
external_alarm:
arista_external_alarm_deasserted_notif: True
arista_external_alarm_asserted_notif: True
vrfs:
- vrf: "vrf01"
local_interface: "Ethernet1"
# After state
# eos#show running-config | section snmp-server
# snmp-server community comm3 view view1 ipv6 list1
# snmp-server community comm4 view view1 list3
# snmp-server community comm5 ro list4
# snmp-server group group1 v1 read view1
# snmp-server group group2 v3 priv write view2 notify view1
# snmp-server host host02 version 2c user01 udp-port 23
# snmp-server host host01 version 3 priv user01 udp-port 23
# snmp-server vrf vrf01 local-interface Ethernet1
# snmp-server contact admin
# snmp-server enable traps bgp
# snmp-server enable traps capacity arista-hardware-utilization-alert
# snmp-server enable traps external-alarm arista-external-alarm-asserted-notif arista-external-alarm-deasserted-notif
#
# Module Execution
#
# "after": {
# "communities": [
# {
# "acl_v6": "list1",
# "name": "comm3",
# "ro": true,
# "view": "view1"
# },
# {
# "acl_v4": "list3",
# "name": "comm4",
# "ro": true,
# "view": "view1"
# },
# {
# "acl_v4": "list4",
# "name": "comm5",
# "ro": true
# }
# ],
# "contact": "admin",
# "groups": [
# {
# "group": "group1",
# "read": "view1",
# "version": "v1"
# },
# {
# "auth_privacy": "priv",
# "group": "group2",
# "notify": "view1",
# "version": "v3",
# "write": "view2"
# }
# ],
# "hosts": [
# {
# "host": "host01",
# "udp_port": 23,
# "user": "user01",
# "version": "3 priv"
# },
# {
# "host": "host02",
# "udp_port": 23,
# "user": "user01",
# "version": "2c"
# }
# ],
# "traps": {
# "bgp": {
# "enabled": true
# },
# "capacity": {
# "arista_hardware_utilization_alert": true
# },
# "external_alarm": {
# "arista_external_alarm_asserted_notif": true,
# "arista_external_alarm_deasserted_notif": true
# }
# },
# "vrfs": [
# {
# "local_interface": "Ethernet1",
# "vrf": "vrf01"
# }
# ]
# },
# "before": {},
# "changed": true,
# "commands": [
# "snmp-server community comm3 view view1 ipv6 list1",
# "snmp-server community comm4 view view1 list3",
# "snmp-server community comm5 ro list4",
# "snmp-server group group1 v1 read view1",
# "snmp-server group group2 v3 priv write view2 notify view1",
# "snmp-server host host02 version 2c user01 udp-port 23",
# "snmp-server host host01 version 3 priv user01 udp-port 23",
# "snmp-server vrf vrf01 local-interface Ethernet1",
# "snmp-server contact admin",
# "snmp-server engineID remote 1.1.1.1 1234567",
# "snmp-server enable traps bgp",
# "snmp-server enable traps capacity arista-hardware-utilization-alert",
# "snmp-server enable traps external-alarm arista-external-alarm-asserted-notif arista-external-alarm-deasserted-notif"
# ],
#
# Using replaced:
# Before State:
# eos#show running-config | section snmp-server
# snmp-server community comm3 view view1 ipv6 list1
# snmp-server community comm4 view view1 list3
# snmp-server community comm5 ro list4
# snmp-server group group1 v1 read view1
# snmp-server group group2 v3 priv write view2 notify view1
# snmp-server host host02 version 2c user01 udp-port 23
# snmp-server host host01 version 3 priv user01 udp-port 23
# snmp-server vrf vrf01 local-interface Ethernet1
# snmp-server contact admin
# snmp-server enable traps bgp
# snmp-server enable traps capacity arista-hardware-utilization-alert
# snmp-server enable traps external-alarm arista-external-alarm-asserted-notif arista-external-alarm-deasserted-notif
- name: Replace given snmp_server configuration
become: true
register: result
arista.eos.eos_snmp_server: &replaced
state: replaced
config:
communities:
- name: "comm3"
acl_v6: "list1"
view: "view1"
- name: "replacecomm"
acl_v4: "list4"
extension:
root_oid: "123456"
script_location: "flash:"
traps:
test:
arista_test_notification: True
bgp:
enabled: True
vrfs:
- vrf: "vrf_replace"
local_interface: "Ethernet1"
# After State:
# eos#show running-config | section snmp-server
# snmp-server community comm3 view view1 ipv6 list1
# snmp-server community replacecomm list4
# snmp-server vrf vrf_replace local-interface Ethernet1
# snmp-server extension 123456 flash:
# snmp-server enable traps test arista-test-notification
# snmp-server enable traps bgp
# Module Execution:
# "after": {
# "communities": [
# {
# "acl_v6": "list1",
# "name": "comm3",
# "ro": true,
# "view": "view1"
# },
# {
# "acl_v4": "list4",
# "name": "replacecomm",
# "ro": true
# }
# ],
# "extension": {
# "root_oid": "0.123456",
# "script_location": "flash:"
# },
# "traps": {
# "bgp": {
# "enabled": true
# },
# "test": {
# "arista_test_notification": true
# }
# },
# "vrfs": [
# {
# "local_interface": "Ethernet1",
# "vrf": "vrf_replace"
# }
# ]
# },
# "before": {
# "communities": [
# {
# "acl_v6": "list1",
# "name": "comm3",
# "ro": true,
# "view": "view1"
# },
# {
# "acl_v4": "list3",
# "name": "comm4",
# "ro": true,
# "view": "view1"
# },
# {
# "acl_v4": "list4",
# "name": "comm5",
# "ro": true
# }
# ],
# "contact": "admin",
# "groups": [
# {
# "group": "group1",
# "read": "view1",
# "version": "v1"
# },
# {
# "auth_privacy": "priv",
# "group": "group2",
# "notify": "view1",
# "version": "v3",
# "write": "view2"
# }
# ],
# "hosts": [
# {
# "host": "host01",
# "udp_port": 23,
# "user": "user01",
# "version": "3 priv"
# },
# {
# "host": "host02",
# "udp_port": 23,
# "user": "user01",
# "version": "2c"
# }
# ],
# "traps": {
# "bgp": {
# "enabled": true
# },
# "capacity": {
# "arista_hardware_utilization_alert": true
# },
# "external_alarm": {
# "arista_external_alarm_asserted_notif": true,
# "arista_external_alarm_deasserted_notif": true
# }
# },
# "vrfs": [
# {
# "local_interface": "Ethernet1",
# "vrf": "vrf01"
# }
# ]
# },
# "changed": true,
# "commands": [
# "snmp-server community comm3 view view1 ipv6 list1",
# "snmp-server community replacecomm list4",
# "no snmp-server community comm4 view view1 ro list3",
# "no snmp-server community comm5 ro list4",
# "no snmp-server group group1 v1 read view1",
# "no snmp-server group group2 v3 priv write view2 notify view1",
# "no snmp-server host host01 version 3 priv user01 udp-port 23",
# "no snmp-server host host02 version 2c user01 udp-port 23",
# "snmp-server vrf vrf_replace local-interface Ethernet1",
# "no snmp-server vrf vrf01 local-interface Ethernet1",
# "snmp-server extension 123456 flash:",
# "default snmp-server enable traps capacity arista-hardware-utilization-alert",
# "default snmp-server enable traps external-alarm arista-external-alarm-asserted-notif arista-external-alarm-deasserted-notif",
# "snmp-server enable traps test arista-test-notification",
# "no snmp-server contact admin"
# ],
# Using overridden:
# Before State:
# eos#show running-config | section snmp-server
# snmp-server community comm3 view view1 ipv6 list1
# snmp-server community comm4 view view1 list3
# snmp-server community comm5 ro list4
# snmp-server group group1 v1 read view1
# snmp-server group group2 v3 priv write view2 notify view1
# snmp-server host host02 version 2c user01 udp-port 23
# snmp-server host host01 version 3 priv user01 udp-port 23
# snmp-server vrf vrf01 local-interface Ethernet1
# snmp-server contact admin
# snmp-server enable traps bgp
# snmp-server enable traps capacity arista-hardware-utilization-alert
# snmp-server enable traps external-alarm arista-external-alarm-asserted-notif arista-external-alarm-deasserted-notif
- name: Override given snmp_server configuration
arista.eos.eos_snmp_server:
state: overridden
config:
communities:
- name: "comm3"
acl_v6: "list1"
view: "view1"
- name: "replacecomm"
acl_v4: "list4"
extension:
root_oid: "123456"
script_location: "flash:"
traps:
test:
arista_test_notification: True
bgp:
enabled: True
vrfs:
- vrf: "vrf_replace"
local_interface: "Ethernet1"
# After State:
# eos#show running-config | section snmp-server
# snmp-server community comm3 view view1 ipv6 list1
# snmp-server community replacecomm list4
# snmp-server vrf vrf_replace local-interface Ethernet1
# snmp-server extension 123456 flash:
# snmp-server enable traps test arista-test-notification
# snmp-server enable traps bgp
# Module Execution:
# "after": {
# "communities": [
# {
# "acl_v6": "list1",
# "name": "comm3",
# "ro": true,
# "view": "view1"
# },
# {
# "acl_v4": "list4",
# "name": "replacecomm",
# "ro": true
# }
# ],
# "extension": {
# "root_oid": "0.123456",
# "script_location": "flash:"
# },
# "traps": {
# "bgp": {
# "enabled": true
# },
# "test": {
# "arista_test_notification": true
# }
# },
# "vrfs": [
# {
# "local_interface": "Ethernet1",
# "vrf": "vrf_replace"
# }
# ]
# },
# "before": {
# "communities": [
# {
# "acl_v6": "list1",
# "name": "comm3",
# "ro": true,
# "view": "view1"
# },
# {
# "acl_v4": "list3",
# "name": "comm4",
# "ro": true,
# "view": "view1"
# },
# {
# "acl_v4": "list4",
# "name": "comm5",
# "ro": true
# }
# ],
# "contact": "admin",
# "groups": [
# {
# "group": "group1",
# "read": "view1",
# "version": "v1"
# },
# {
# "auth_privacy": "priv",
# "group": "group2",
# "notify": "view1",
# "version": "v3",
# "write": "view2"
# }
# ],
# "hosts": [
# {
# "host": "host01",
# "udp_port": 23,
# "user": "user01",
# "version": "3 priv"
# },
# {
# "host": "host02",
# "udp_port": 23,
# "user": "user01",
# "version": "2c"
# }
# ],
# "traps": {
# "bgp": {
# "enabled": true
# },
# "capacity": {
# "arista_hardware_utilization_alert": true
# },
# "external_alarm": {
# "arista_external_alarm_asserted_notif": true,
# "arista_external_alarm_deasserted_notif": true
# }
# },
# "vrfs": [
# {
# "local_interface": "Ethernet1",
# "vrf": "vrf01"
# }
# ]
# },
# "changed": true,
# "commands": [
# "snmp-server community comm3 view view1 ipv6 list1",
# "snmp-server community replacecomm list4",
# "no snmp-server community comm4 view view1 ro list3",
# "no snmp-server community comm5 ro list4",
# "no snmp-server group group1 v1 read view1",
# "no snmp-server group group2 v3 priv write view2 notify view1",
# "no snmp-server host host01 version 3 priv user01 udp-port 23",
# "no snmp-server host host02 version 2c user01 udp-port 23",
# "snmp-server vrf vrf_replace local-interface Ethernet1",
# "no snmp-server vrf vrf01 local-interface Ethernet1",
# "snmp-server extension 123456 flash:",
# "default snmp-server enable traps capacity arista-hardware-utilization-alert",
# "default snmp-server enable traps external-alarm arista-external-alarm-asserted-notif arista-external-alarm-deasserted-notif",
# "snmp-server enable traps test arista-test-notification",
# "no snmp-server contact admin"
# ],
# Using deleted:
# Before State:
# eos#show running-config | section snmp-server
# snmp-server community comm3 view view1 ipv6 list1
# snmp-server community comm4 view view1 list3
# snmp-server community comm5 ro list4
# snmp-server group group1 v1 read view1
# snmp-server group group2 v3 priv write view2 notify view1
# snmp-server host host02 version 2c user01 udp-port 23
# snmp-server host host01 version 3 priv user01 udp-port 23
# snmp-server vrf vrf01 local-interface Ethernet1
# snmp-server contact admin
# snmp-server enable traps bgp
# snmp-server enable traps capacity arista-hardware-utilization-alert
# snmp-server enable traps external-alarm arista-external-alarm-asserted-notif arista-external-alarm-deasserted-notif
- name: Delete given snmp_server configuration
arista.eos.eos_snmp_server:
state: deleted
# After State:
# eos#show running-config | section snmp-server
#
# Module Execution:
# "after": {},
# "before": {
# "communities": [
# {
# "acl_v6": "list1",
# "name": "comm3",
# "ro": true,
# "view": "view1"
# },
# {
# "acl_v4": "list3",
# "name": "comm4",
# "ro": true,
# "view": "view1"
# },
# {
# "acl_v4": "list4",
# "name": "comm5",
# "ro": true
# }
# ],
# "contact": "admin",
# "groups": [
# {
# "group": "group1",
# "read": "view1",
# "version": "v1"
# },
# {
# "auth_privacy": "priv",
# "group": "group2",
# "notify": "view1",
# "version": "v3",
# "write": "view2"
# }
# ],
# "hosts": [
# {
# "host": "host01",
# "udp_port": 23,
# "user": "user01",
# "version": "3 priv"
# },
# {
# "host": "host02",
# "udp_port": 23,
# "user": "user01",
# "version": "2c"
# }
# ],
# "traps": {
# "bgp": {
# "enabled": true
# },
# "capacity": {
# "arista_hardware_utilization_alert": true
# },
# "external_alarm": {
# "arista_external_alarm_asserted_notif": true,
# "arista_external_alarm_deasserted_notif": true
# }
# },
# "vrfs": [
# {
# "local_interface": "Ethernet1",
# "vrf": "vrf01"
# }
# ]
# },
# "changed": true,
# "commands": [
# "no snmp-server community comm3 view view1 ro ipv6 list1",
# "no snmp-server community comm4 view view1 ro list3",
# "no snmp-server community comm5 ro list4",
# "no snmp-server group group1 v1 read view1",
# "no snmp-server group group2 v3 priv write view2 notify view1",
# "no snmp-server host host01 version 3 priv user01 udp-port 23",
# "no snmp-server host host02 version 2c user01 udp-port 23",
# "no snmp-server vrf vrf01 local-interface Ethernet1",
# "no snmp-server contact admin",
# "default snmp-server enable traps bgp",
# "default snmp-server enable traps capacity arista-hardware-utilization-alert",
# "default snmp-server enable traps external-alarm arista-external-alarm-asserted-notif arista-external-alarm-deasserted-notif"
# ],
#
# Using parsed:
# _parsed.cfg
# snmp-server contact admin
# snmp-server vrf vrf01 local-interface Ethernet1
# snmp-server community comm3 view view1 ro ipv6 list1
# snmp-server community comm4 view view1 ro list3
# snmp-server community comm5 ro list4
# snmp-server group group1 v1 read view1
# snmp-server group group2 v3 priv write view2 notify view1
# snmp-server host host01 version 3 priv user01 udp-port 23
# snmp-server host host02 version 2c user01 udp-port 23
# snmp-server enable traps bgp
# snmp-server enable traps capacity arista-hardware-utilization-alert
# snmp-server enable traps external-alarm arista-external-alarm-asserted-notif
# snmp-server enable traps external-alarm arista-external-alarm-deasserted-notif
- name: Provide the running configuration for parsing (config to be parsed)
arista.eos.eos_snmp_server:
running_config: "{{ lookup('file', '_parsed.cfg') }}"
state: parsed
# Module Execution:
# "parsed": {
# "communities": [
# {
# "acl_v6": "list1",
# "name": "comm3",
# "ro": true,
# "view": "view1"
# },
# {
# "acl_v4": "list3",
# "name": "comm4",
# "ro": true,
# "view": "view1"
# },
# {
# "acl_v4": "list4",
# "name": "comm5",
# "ro": true
# }
# ],
# "contact": "admin",
# "groups": [
# {
# "group": "group1",
# "read": "view1",
# "version": "v1"
# },
# {
# "auth_privacy": "priv",
# "group": "group2",
# "notify": "view1",
# "version": "v3",
# "write": "view2"
# }
# ],
# "hosts": [
# {
# "host": "host01",
# "udp_port": 23,
# "user": "user01",
# "version": "3 priv"
# },
# {
# "host": "host02",
# "udp_port": 23,
# "user": "user01",
# "version": "2c"
# }
# ],
# "traps": {
# "bgp": {
# "enabled": true
# },
# "capacity": {
# "arista_hardware_utilization_alert": true
# },
# "external_alarm": {
# "arista_external_alarm_asserted_notif": true,
# "arista_external_alarm_deasserted_notif": true
# }
# },
# "vrfs": [
# {
# "local_interface": "Ethernet1",
# "vrf": "vrf01"
# }
# ]
# }
# Using rendered:
- name: Render given snmp_server configuration
arista.eos.eos_snmp_server:
state: "rendered"
config:
communities:
- name: "comm3"
acl_v6: "list1"
view: "view1"
- name: "comm4"
acl_v4: "list3"
view: "view1"
- name: "comm5"
acl_v4: "list4"
ro: True
contact: "admin"
engineid:
remote:
host: 1.1.1.1
id: "1234567"
groups:
- group: "group1"
version: "v1"
read: "view1"
- group: "group2"
version: "v3"
auth_privacy: "priv"
notify: "view1"
write: "view2"
hosts:
- host: "host02"
user: "user01"
udp_port: 23
version: "2c"
- host: "host01"
user: "user01"
udp_port: 23
version: "3 priv"
traps:
capacity:
arista_hardware_utilization_alert: True
bgp:
enabled: True
external_alarm:
arista_external_alarm_deasserted_notif: True
arista_external_alarm_asserted_notif: True
vrfs:
- vrf: "vrf01"
local_interface: "Ethernet1"
# Module Execution:
# "rendered": [
# "snmp-server community comm3 view view1 ipv6 list1",
# "snmp-server community comm4 view view1 list3",
# "snmp-server community comm5 ro list4",
# "snmp-server group group1 v1 read view1",
# "snmp-server group group2 v3 priv write view2 notify view1",
# "snmp-server host host02 version 2c user01 udp-port 23",
# "snmp-server host host01 version 3 priv user01 udp-port 23",
# "snmp-server vrf vrf01 local-interface Ethernet1",
# "snmp-server contact admin",
# "snmp-server engineID remote 1.1.1.1 1234567",
# "snmp-server enable traps bgp",
# "snmp-server enable traps capacity arista-hardware-utilization-alert",
# "snmp-server enable traps external-alarm arista-external-alarm-asserted-notif arista-external-alarm-deasserted-notif"
# ]
# using gathered:
# eos#show running-config | section snmp-server
# snmp-server community comm3 view view1 ipv6 list1
# snmp-server community comm4 view view1 list3
# snmp-server community comm5 ro list4
# snmp-server group group1 v1 read view1
# snmp-server group group2 v3 priv write view2 notify view1
# snmp-server host host02 version 2c user01 udp-port 23
# snmp-server host host01 version 3 priv user01 udp-port 23
# snmp-server vrf vrf01 local-interface Ethernet1
# snmp-server contact admin
# snmp-server enable traps bgp
# snmp-server enable traps capacity arista-hardware-utilization-alert
# snmp-server enable traps external-alarm arista-external-alarm-asserted-notif arista-external-alarm-deasserted-notif
- name: Gathered the provided configuration with the exisiting running configuration
arista.eos.eos_snmp_server:
config:
state: gathered
# Module Execution:
# "gathered": {
# "communities": [
# {
# "acl_v6": "list1",
# "name": "comm3",
# "ro": true,
# "view": "view1"
# },
# {
# "acl_v4": "list3",
# "name": "comm4",
# "ro": true,
# "view": "view1"
# },
# {
# "acl_v4": "list4",
# "name": "comm5",
# "ro": true
# }
# ],
# "contact": "admin",
# "groups": [
# {
# "group": "group1",
# "read": "view1",
# "version": "v1"
# },
# {
# "auth_privacy": "priv",
# "group": "group2",
# "notify": "view1",
# "version": "v3",
# "write": "view2"
# }
# ],
# "hosts": [
# {
# "host": "host01",
# "udp_port": 23,
# "user": "user01",
# "version": "3 priv"
# },
# {
# "host": "host02",
# "udp_port": 23,
# "user": "user01",
# "version": "2c"
# }
# ],
# "traps": {
# "bgp": {
# "enabled": true
# },
# "capacity": {
# "arista_hardware_utilization_alert": true
# },
# "external_alarm": {
# "arista_external_alarm_asserted_notif": true,
# "arista_external_alarm_deasserted_notif": true
# }
# },
# "vrfs": [
# {
# "local_interface": "Ethernet1",
# "vrf": "vrf01"
# }
# ]
# },
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
The resulting configuration after module execution. Returned: when changed Sample: |
|
The configuration prior to the module execution. Returned: when state is Sample: |
|
The set of commands pushed to the remote device. Returned: when state is Sample: |
|
Facts about the network resource gathered from the remote device as structured data. Returned: when state is Sample: |
|
The device native config provided in running_config option parsed into structured data as per module argspec. Returned: when state is Sample: |
|
The provided configuration in the task rendered in device-native format (offline). Returned: when state is Sample: |