arubanetworks.aos_switch.arubaoss_snmp (1.7.0) — module

implements rest api for snmp configuration

| "added in version" 2.6.0 of arubanetworks.aos_switch"

Authors: Ashish Pant (@hpe)

preview | supported by community

Install collection

Install with ansible-galaxy collection install arubanetworks.aos_switch:==1.7.0


Add to requirements.yml

  collections:
    - name: arubanetworks.aos_switch
      version: 1.7.0

Description

This implements rest api's which configure snmp on device

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
      - name: configure snmp community
        arubaoss_snmp:
          community_name: test
          access_type: "{{item}}"
        with_items:
          - UT_MANAGER
          - UT_MANAGER
          - UT_OPERATOR
          - UT_OPERATOR
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
      - name: configure snmp community
        arubaoss_snmp:
          community_name: test
          access_type: "{{item.role}}"
          restricted: "{{item.res}}"
        with_items:
          - {"role":"UT_MANAGER","res":False}
          - {"role":"UT_MANAGER","res":True}
          - {"role":"UT_MANAGER","res":True}
          - {"role":"UT_OPERATOR","res":False}
          - {"role":"UT_OPERATOR","res":True}
          - {"role":"UT_OPERATOR","res":True}
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.

      - name: configure snmp host
        arubaoss_snmp:
          community_name: test
          host_ip: "{{item}}"
        with_items:
          - 10.1.1.1
          - 10.1.1.1
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
      - name: configure snmp host inform
        arubaoss_snmp:
          community_name: test
          host_ip: 10.1.1.1
          informs: "{{item}}"
        with_items:
          - True
          - True
          - False
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
      - name: configure snmp host inform retry timeout
        arubaoss_snmp:
          community_name: test
          host_ip: 10.1.1.1
          informs: True
          inform_retries: "{{item.retry}}"
          inform_timeout: "{{item.timeout}}"
        with_items:
          - {"retry":10,"timeout":20}
          - {"retry":100,"timeout":200}
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
      - name: delete snmp host inform retry timeout
        arubaoss_snmp:
          community_name: test
          informs: False
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
      - name: configure snmp host trap-level
        arubaoss_snmp:
          community_name: test
          host_ip: 10.1.1.1
          trap_level: "{{item}}"
        with_items:
          - STL_ALL
          - STL_CRITICAL
          - STL_NOT_INFO
          - STL_DEBUG
          - STL_NONE
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
      - name: configure snmp host inform retry timeout traplevel
        arubaoss_snmp:
          community_name: test
          host_ip: 10.1.1.1
          informs: True
          inform_retries: "{{item.retry}}"
          inform_timeout: "{{item.timeout}}"
          trap_level: "{{item.trap}}"
        with_items:
          - {"retry":10,"timeout":20,"trap":"STL_CRITICAL"}
          - {"retry":100,"timeout":200,"trap":"STL_DEBUG"}
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
      - name: configure snmp host oobm
        arubaoss_snmp:
          community_name: test
          host_ip: 10.1.1.1
          use_oobm: "{{item}}"
        with_items:
          - True
          - True
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
      - name: delete snmp host
        arubaoss_snmp:
          community_name: test
          state: delete
          host_ip: 10.1.1.1
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
      - name: configure snmp host
        arubaoss_snmp:
          community_name: test
          host_ip: 10.1.1.1
          state : delete
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.

      - name: delete snmp community
        arubaoss_snmp:
          community_name: test
          state: delete
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
      - name: delete snmp community
        arubaoss_snmp:
          community_name: test
          state: delete
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
      - name: snmp contact and location
        arubaoss_snmp:
          location: lab
          contact: test_lab
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
      - name: delete snmp location
        arubaoss_snmp:
          location: lab
          state: delete
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
      - name: delete snmp contact
        arubaoss_snmp:
          contact: test_lab
          state: delete

Inputs

    
host:
    description: 'Specifies the DNS host name or address for connecting to the remote
      device over the specified transport. The value of host is used as the destination
      address for the transport.

      '
    type: str

port:
    description: 'Specifies the port to use when building the connection to the remote
      device.

      '
    type: int

contact:
    description:
    - Server contact
    required: false

host_ip:
    description:
    - Snmp host ip address
    required: false

informs:
    description:
    - Enable/disables informs to host
    required: false

timeout:
    description: 'Specifies the timeout in seconds for communicating with the network
      device for either connecting or sending commands. If the timeout is exceeded before
      the operation is completed, the module will error.

      '
    type: int

use_ssl:
    description: 'Configures use SSL (HTTPS) for access to the remote device.

      '
    type: bool

version:
    choices:
    - IAP_IP_V4
    default: IAP_IP_V4
    description:
    - Host IP address version
    required: false

location:
    description:
    - Server location
    required: false

password:
    description: 'Specifies the password to use to authenticate the connection to the
      remote device. This value is used to authenticate the SSH session. If the value
      is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD
      will be used instead.

      '
    type: str

provider:
    description: A dict object containing connection details.
    suboptions:
      api_version:
        default: None
        description: 'Configures (force) API version (vX.Y) for acces to the remote device.

          '
        type: str
      host:
        description: 'Specifies the DNS host name or address for connecting to the remote
          device over the specified transport. The value of host is used as the destination
          address for the transport.

          '
        type: str
      password:
        description: 'Specifies the password to use to authenticate the connection to
          the remote device. This value is used to authenticate the SSH session. If the
          value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD
          will be used instead.

          '
        type: str
      port:
        description: 'Specifies the port to use when building the connection to the remote
          device.

          '
        type: int
      ssh_keyfile:
        description: 'Specifies the SSH key to use to authenticate the connection to the
          remote device. This value is the path to the key used to authenticate the SSH
          session. If the value is not specified in the task, the value of environment
          variable ANSIBLE_NET_SSH_KEYFILE will be used instead.

          '
        type: path
      timeout:
        description: 'Specifies the timeout in seconds for communicating with the network
          device for either connecting or sending commands. If the timeout is exceeded
          before the operation is completed, the module will error.

          '
        type: int
      transport:
        default: aossapi
        description: 'Configures the transport (aossapi or network_cli) mode.

          '
        type: str
      use_proxy:
        default: false
        description: 'Configures use (Local) Proxy for access to the remote device.

          '
        type: bool
      use_ssl:
        description: 'Configures use SSL (HTTPS) for access to the remote device.

          '
        type: bool
      username:
        description: 'Configures the username to use to authenticate the connection to
          the remote device. This value is used to authenticate the SSH session. If the
          value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME
          will be used instead.

          '
        type: str
      validate_certs:
        default: false
        description: 'Configures validation of certification for access to the remote
          device.

          '
        type: bool
    type: dict

use_oobm:
    description:
    - Enable/disable oobm port usage
    required: false

username:
    description: 'Configures the username to use to authenticate the connection to the
      remote device. This value is used to authenticate the SSH session. If the value
      is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME
      will be used instead.

      '
    type: str

restricted:
    description:
    - Extent of access restricted or unrestricted
    required: false

trap_level:
    choices:
    - STL_ALL
    - STL_CRITICAL
    - STL_NOT_INFO
    - STL_DEBUG
    - STL_NONE
    default: STL_NONE
    description:
    - Trap level for host
    required: false

access_type:
    choices:
    - UT_OPERATOR
    - UT_MANAGER
    default: UT_OPERATOR
    description:
    - Type of access required. Operator or Manager.
    required: false

api_version:
    default: None
    description: 'Configures (force) API version (vX.Y) for acces to the remote device.

      '
    type: str

ssh_keyfile:
    description: 'Specifies the SSH key to use to authenticate the connection to the remote
      device. This value is the path to the key used to authenticate the SSH session.
      If the value is not specified in the task, the value of environment variable ANSIBLE_NET_SSH_KEYFILE
      will be used instead.

      '
    type: path

community_name:
    description:
    - snmp community name. Required when configuring community
    required: false

inform_retires:
    default: 3
    description:
    - Retries required for informs
    required: false

inform_timeout:
    default: 15
    description:
    - Timeout for informs
    required: false

validate_certs:
    default: false
    description: 'Configures validation of certification for access to the remote device.

      '
    type: bool