ansible.builtin.ce_snmp_contact (v2.9.27) — module

Manages SNMP contact configuration on HUAWEI CloudEngine switches.

| "added in version" 2.4 of ansible.builtin"

Authors: wangdezhuang (@QijunPan)

preview | supported by community

Install Ansible via pip

Install with pip install ansible==2.9.27

Description

Manages SNMP contact configurations on HUAWEI CloudEngine switches.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.

- name: CloudEngine snmp contact 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 contact"
    ce_snmp_contact:
      state: present
      contact: call Operator at 010-99999999
      provider: "{{ cli }}"

  - name: "Undo SNMP contact"
    ce_snmp_contact:
      state: absent
      contact: call Operator at 010-99999999
      provider: "{{ cli }}"

Inputs

    
state:
    choices:
    - present
    - absent
    default: present
    description:
    - Manage the state of the resource.

contact:
    description:
    - Contact information.
    required: true

Outputs

changed:
  description: check to see if a change was made on the device
  returned: always
  sample: true
  type: bool
end_state:
  description: k/v pairs of aaa params after module execution
  returned: always
  sample:
    contact: call Operator at 010-99999999
  type: dict
existing:
  description: k/v pairs of existing aaa server
  returned: always
  sample: {}
  type: dict
proposed:
  description: k/v pairs of parameters passed into module
  returned: always
  sample:
    contact: call Operator at 010-99999999
    state: present
  type: dict
updates:
  description: command sent to the device
  returned: always
  sample:
  - snmp-agent sys-info contact call Operator at 010-99999999
  type: list