ansible-collections / ansible.snmp

GNU General Public License v3.0
10 stars 5 forks source link

ERROR! couldn't resolve module/action 'ansible.snmp.v3_usm' #28

Closed zdudic closed 1 month ago

zdudic commented 2 months ago
SUMMARY

Hi. I believe the collection ansible.snmp is properly installed. Still, the error is "couldn't resolve module/action 'ansible.snmp.v3_usm'"

ISSUE TYPE
COMPONENT NAME
ANSIBLE VERSION
ansible [core 2.15.12]
with
Python 3.10.4
COLLECTION VERSION
$ ansible-galaxy collection list ansible.snmp

# /z/python-virtualenv/python3.10.4_ansible-core2.15/lib/python3.10/site-packages/ansible_collections
Collection   Version
------------ -------
ansible.snmp 3.0.0

# Verify collection

$ ansible-galaxy collection verify  ansible.snmp

Downloading https://galaxy.ansible.com/api/v3/plugin/ansible/content/published/collections/artifacts/ansible-snmp-3.0.0.tar.gz to /z/.ansible/tmp/ansible-local-943605cbae2l_8/tmpn1z3m8xi/ansible-snmp-3.0.0-w38zasj7
Verifying 'ansible.snmp:3.0.0'.
Installed collection found at '/z/python-virtualenv/python3.10.4_ansible-core2.15/lib/python3.10/site-packages/ansible_collections/ansible/snmp'
MANIFEST.json hash: f23aaf2329682b1d64feecbf4bcc2ad6f5402239bf1b7f96f88ca410176b9b41
Successfully verified that checksums for 'ansible.snmp:3.0.0' match the remote collection.
CONFIGURATION
$ ansible-config dump --only-changed

COLLECTIONS_PATHS(/home/z/.ansible.cfg) = ['/z/python-virtualenv/python3.10.4_ansible-core2.15/lib/python3.10/site-packages/ansible_collections']
COLOR_ERROR(/z/.ansible.cfg) = red
COLOR_VERBOSE(/z/.ansible.cfg) = white
COLOR_WARN(/zc/.ansible.cfg) = bright purple
CONFIG_FILE() = /z/.ansible.cfg
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/path/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 9

STEPS TO REPRODUCE
This task fails

- name: Gather SNMP v3 facts
  delegate_to: localhost
  ansible.snmp.v3_usm:
    host: "{{ hostname }}"
    sec_level: authPriv
    version: 3
    username: "{{ userv3 }}"
    auth_proto: sha1
    auth_pass: "{{ authpasswd }}"
    priv_proto: aes128
    priv_pass: "{{ privpasswd }}"
EXPECTED RESULTS

I expect that ansible.snmp.v3_usm is found.

ACTUAL RESULTS
Actual result is error:
ERROR! couldn't resolve module/action 'ansible.snmp.v3_usm'

# During play run with -vvvv, messages are:

Loading collection ansible.builtin from
Loading collection community.general from /z/python-virtualenv/python3.10.4_ansible-core2.15/lib/python3.10/site-packages/ansible_collections/community/general

Interestingly there is no attempt to load collection ansible.snmp, which is installed in same location as community.general
zdudic commented 1 month ago

Invalid issue, ansible.snmp.v3_usm is connection plugin, not module.