Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

community.general.snmp_facts support for pysnmp verison newer then 4 #8852

Open
1 task done
zdudic opened this issue Sep 10, 2024 · 2 comments
Open
1 task done

community.general.snmp_facts support for pysnmp verison newer then 4 #8852

zdudic opened this issue Sep 10, 2024 · 2 comments
Labels
bug This issue/PR relates to a bug module module plugins plugin (any type)

Comments

@zdudic
Copy link

zdudic commented Sep 10, 2024

Summary

When using pysnmp v7, the module community.general.snmp_facts fails with the error:

ModuleNotFoundError: No module named pysnmp.entity.rfc3413.oneliner

Issue Type

Bug Report

Component Name

snmp_facts

Ansible Version

ansible [core 2.12.10]
python version = 3.10.4 (main, Jan  6 2023, 13:52:42) [GCC 10.2.1 20210130 (Red Hat 10.2.1-11.1.0.1)]
jinja version = 3.1.4

Community.general Version

$ Collection        Version
----------------- -------
community.general 8.6.0

Configuration

COLLECTIONS_PATHS(/z/.ansible.cfg) = ['/z/python']
COLOR_ERROR(/z/.ansible.cfg) = red
COLOR_VERBOSE(/z/.ansible.cfg) = white
COLOR_WARN(/z/.ansible.cfg) = bright purple
DEFAULT_GATHERING(/z/.ansible.cfg) = explicit
DEFAULT_LOAD_CALLBACK_PLUGINS(/z/.ansible.cfg) = True
DEFAULT_LOG_PATH(/z/.ansible.cfg) = /tmp/ansible.log
DEFAULT_ROLES_PATH(/z/.ansible.cfg) = ['/z/ansible-local/oci-misc/roles, /z/roles
DEFAULT_TIMEOUT(/z/.ansible.cfg) = 30
DEPRECATION_WARNINGS(/z/.ansible.cfg) = False
HOST_KEY_CHECKING(/z/.ansible.cfg) = False
INTERPRETER_PYTHON(/z/.ansible.cfg) = auto_silent
INVENTORY_ENABLED(/z/.ansible.cfg) = ['oracle.oci.oci', 'nmap', 'host_list', 'script', 'yaml', 'ini']

OS / Environment

RHEL 7

Steps to Reproduce

- name: Gather SNMP v3 facts
  delegate_to: localhost
  community.general.snmp_facts:
    host: "{{ hostname }}"
    version: v3
    level: authPriv
    integrity: sha
    privacy: aes
    username: "{{ user }}"
    authkey: "{{ authpasswd }}"
    privkey: "{{ privpasswd. }}"
    retries: 2
  
  register: _snmp_facts

Expected Results

I expect above task not to fail.

Actual Results

It fails with error

"ModuleNotFoundError: No module named pysnmp.entity.rfc3413.oneliner".

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@ansibullbot
Copy link
Collaborator

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added bug This issue/PR relates to a bug module module plugins plugin (any type) labels Sep 10, 2024
@zdudic zdudic changed the title community.general.snmp_facts support for pysnmp verison older then 4 community.general.snmp_facts support for pysnmp verison newer then 4 Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug module module plugins plugin (any type)
Projects
None yet
Development

No branches or pull requests

2 participants