ce_snmp_target_host - Manages SNMP target host configuration on HUAWEI CloudEngine switches.

New in version 2.4.

Synopsis

  • Manages SNMP target host configurations on HUAWEI CloudEngine switches.

Options

parameter required default choices comments
address
no
Network Address.
connect_port
no
Udp port used by SNMP agent to connect the Network management.
host_name
no
Unique name to identify target host entry.
interface_name
no
Name of the interface to send the trap message.
is_public_net
no no_use
  • no_use
  • true
  • false
To enable or disable Public Net-manager for target Host.
notify_type
no
  • trap
  • inform
To configure notify type as trap or inform.
recv_port
no
UDP Port number used by network management to receive alarm messages.
security_level
no
  • noAuthNoPriv
  • authentication
  • privacy
Security level indicating whether to use authentication and encryption.
security_model
no
  • v1
  • v2c
  • v3
Security Model.
security_name
no
Security Name.
security_name_v3
no
Security Name V3.
version
no
  • none
  • v1
  • v2c
  • v3
  • v1v2c
  • v1v3
  • v2cv3
  • all
Version(s) Supported by SNMP Engine.
vpn_name
no
VPN instance Name.

Examples

- name: CloudEngine snmp target host test
  hosts: cloudengine
  connection: local
  gather_facts: no
  vars:
    cli:
      host: "{{ inventory_hostname }}"
      port: "{{ ansible_ssh_port }}"
      username: "{{ username }}"
      password: "{{ password }}"
      transport: cli

  tasks:

  - name: "Config SNMP version"
    ce_snmp_target_host:
      state: present
      version: v2cv3
      provider: "{{ cli }}"

  - name: "Config SNMP target host"
    ce_snmp_target_host:
      state: present
      host_name: test1
      address: 1.1.1.1
      notify_type: trap
      vpn_name: js
      security_model: v2c
      security_name: wdz
      provider: "{{ cli }}"

Return Values

Common return values are documented here Return Values, the following are the fields unique to this module:

name description returned type sample
changed
check to see if a change was made on the device
always boolean True
end_state
k/v pairs of aaa params after module execution
always dict {'target host info': [{'securityLevel': 'authentication', 'domain': 'snmpUDPDomain', 'address': '10.135.182.158', 'notifyType': 'trap', 'nmsName': 'test2', 'vpnInstanceName': 'js', 'securityNameV3': 'wdz', 'securityModel': 'v3'}]}
existing
k/v pairs of existing aaa server
always dict {}
proposed
k/v pairs of parameters passed into module
always dict {'security_name_v3': 'wdz', 'security_model': 'v3', 'vpn_name': 'js', 'security_level': 'authentication', 'state': 'present', 'host_name': 'test2', 'address': '10.135.182.158', 'notify_type': 'trap'}
updates
command sent to the device
always list ['snmp-agent target-host host-name test2 trap address udp-domain 10.135.182.158 vpn-instance js params securityname wdz v3 authentication']

Status

This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.

For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.

© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.4/ce_snmp_target_host_module.html