The Red Hat Ecosystem Catalog is the official source for discovering and learning more about the Red Hat Ecosystem of both Red Hat and certified third-party products and services.
We’re the world’s leading provider of enterprise open source solutions—including Linux, cloud, container, and Kubernetes. We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.
3Modules6Plugins1Dependency
The Ansible ansible.snmp collection includes a variety of plugins for using SNMP on the control node to make SNMP connections to a device.
The Ansible ansible.snmp
collection includes a variety of plugins for using SNMP on the control node to make SNMP connections to a device.
This collection has been tested against following Ansible versions: >=2.14.0.
For collections that support Ansible 2.9, please ensure you update your network_os
to use the
fully qualified collection name (for example, cisco.ios.ios
).
Plugins and modules within a collection may be tested with only specific Ansible versions.
A collection may contain metadata that identifies these versions.
PEP440 is the schema used to describe the versions of Ansible.
Name | Description |
---|---|
ansible.snmp.v1 | Make SNMP v1 connections to a device |
ansible.snmp.v2c | Make SNMP v2c connections to a device |
ansible.snmp.v3_usm | Make SNMP v3 user-based security model (USM) connections to a device. |
Name | Description |
---|---|
ansible.snmp.get | Perform an SNMP get against a remote device for one or more OIDs |
ansible.snmp.set | Perform an SNMP set against a remote device for one or more OIDs |
ansible.snmp.walk | Perform an SNMP walk against a remote device for one or more OIDs |
You can install the ansible.snmp
collection with the Ansible Galaxy CLI:
ansible-galaxy collection install ansible.snmp
You can also include it in a requirements.yml
file and install it with ansible-galaxy collection install -r requirements.yml
, using the format:
---
collections:
- name: ansible.snmp
You can call modules by their Fully Qualified Collection Namespace (FQCN), such as ansible.snmp.get
.
The most common use case for this collection is to retrieve operation state information from a device using SNMP get
or SNMP walk
The following example task gets the existing configuration on an SNMP-enabled device, using the FQCN:
---
- name: Retrieve several individual OIDs
ansible.snmp.get:
oids:
- oid: "SNMPv2-MIB::sysDescr.0"
- oid: "SNMPv2-MIB::sysDescr"
iid: "0"
numeric: false
long_names: True
NOTE: For Ansible 2.9, you may not see deprecation warnings when you run your playbooks with this collection. Use this documentation to track when a module is deprecated.
This collection is intended for plugins that are not platform or discipline-specific. Simple plugin examples should be generic in nature. More complex examples can include real-world platform modules to demonstrate the utility of the plugin in a playbook.
We welcome community contributions to this collection. If you find problems, please open an issue or create a PR against the ansible.utils collection repository. See Contributing to Ansible-maintained collections for complete details.
See the Ansible Community Guide for details on contributing to Ansible.
This collection follows the Ansible project's Code of Conduct. Please read and familiarize yourself with this document.
Release notes are available here For automated release announcements refer here.
For information on releasing, versioning and deprecation see the strategy document.
In general, major versions can contain breaking changes, while minor versions only contain new features (like new plugin addition) and bug fixes. The releases will be done on an as-needed basis when new features and/or bug fixes are done.
GNU General Public License v3.0 or later.
See LICENSE to see the full text.
sudo dnf install net-snmp net-snmp-libs net-snmp-utils net-snmp-python
or
tar -xvf net-snmp-5.9.1.tar.gz
sudo su -
cd net-snmp-5.9.1
./configure --with-python-modules --libdir=/usr/lib64 --enable-shared
make
sudo make install
more /etc/ld.so.conf.d/netsnmp.conf
/usr/local/lib
python
python setup.py build
python setup.py install
or python setup.py install --user
python -c 'import netsnmp'
sudo dnf install perl-Term-ReadLine-Gnu
snmpconf -p
~/.snmp/snmp.conf
python3 -m venv venv --system-site-packages
or install again after sourcing venv
python3 -m venv venv
source venv/bin/activate
pip install net-snmp-5.9.1/python
GNU General Public License v3.0 or later.
See LICENSE to see the full text.
Product |
---|
Red Hat Ansible Automation Platform 2.4 |
This collection requires the following collections for use:
Name | Summary |
---|