ansible.snmp.v1 (2.0.0) — connection

Make SNMP v1 connections to a device

| "added in version" 1.0.0 of ansible.snmp"

Authors: Bradley Thornton (@cidrblock)

Install collection

Install with ansible-galaxy collection install ansible.snmp:==2.0.0


Add to requirements.yml

  collections:
    - name: ansible.snmp
      version: 2.0.0

Description

Make SNMP v1 connections to a device.


Requirements

Inputs

    
host:
    default: inventory_hostname
    description:
    - Specifies the remote device FQDN or IP address for the SNMP connection to.
    type: str
    vars:
    - name: ansible_host

port:
    default: 161
    description:
    - Specifies the port on the remote device that listens for SNMP connections.
    env:
    - name: ANSIBLE_REMOTE_PORT
    ini:
    - key: remote_port
      section: defaults
    type: int
    vars:
    - name: ansible_port

retries:
    default: 3
    description:
    - Specify the number retries before failure
    env:
    - name: ANSIBLE_SNMP_RETRIES
    ini:
    - key: retries
      section: ansible.snmp
    type: int
    vars:
    - name: ansible_snmp_retries

timeout:
    default: 500000
    description:
    - Specify the number of micro-seconds before a retry
    env:
    - name: ANSIBLE_SNMP_TIMEOUT
    ini:
    - key: timeout
      section: ansible.snmp
    type: int
    vars:
    - name: ansible_snmp_timeout

version:
    choices:
    - 1
    default: 1
    description:
    - Specify the SNMP version
    type: int

community:
    default: public
    description:
    - Specific the community string for SNMP v1 connections.
    env:
    - name: ANSIBLE_SNMP_COMMUNITY
    ini:
    - key: community
      section: ansible.snmp
    type: str
    vars:
    - name: ansible_snmp_community

retry_no_such:
    default: false
    description:
    - If enabled NOSUCH errors in 'get' pdus will be repaired, removing the entry in error,
      and resent, undef will be returned for all NOSUCH varbinds, when set to `False`
      this feature is disabled and the entire get request will fail on any NOSUCH error.
    env:
    - name: ANSIBLE_SNMP_RETRY_NO_SUCH
    ini:
    - key: retry_no_such
      section: ansible.snmp
    type: bool
    vars:
    - name: ansible_snmp_retry_no_such