# Snmp\_facts v3 get stuck after running ansible-playbook

**URL:** <https://forum.ansible.com/t/snmp-facts-v3-get-stuck-after-running-ansible-playbook/44986>\
**Category:** Get Help\
**Tags:** cisco, ansible, ubuntu\
**Created:** [December 11, 2025, 2:14pm UTC](https://forum.ansible.com/t/snmp-facts-v3-get-stuck-after-running-ansible-playbook/44986 "2025-12-11T14:14:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ali-taha](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@ali-taha](https://forum.ansible.com/u/ali-taha)\
**Post date:** [December 11, 2025, 2:14pm UTC](https://forum.ansible.com/t/snmp-facts-v3-get-stuck-after-running-ansible-playbook/44986/1 "2025-12-11T14:14:17Z")

</div>

Hi Everyone,

I was working with snmp\_facts v2 module to gather a variety of facts from the cisco Switches. Now we migrated from snmp v2 to v3 on all switches that we administer. Thus, i tried to adjust the playbook in which i can gather the snmp-facts with v3.

The Problem now that the Playbook get stuck when it reaches the snmp-facts task.

Note: i did a snmp-walk from the terminal with v3 Credentials, it works fine.

I am using Ubuntu:

DISTRIB\_ID=Ubuntu  
DISTRIB\_RELEASE=22.04  
DISTRIB\_CODENAME=jammy  
DISTRIB\_DESCRIPTION=“Ubuntu 22.04.5 LTS”  
PRETTY\_NAME=“Ubuntu 22.04.5 LTS”  
NAME=“Ubuntu”  
VERSION\_ID=“22.04”  
VERSION=“22.04.5 LTS (Jammy Jellyfish)”

Ansible Version:

ansible [core 2.17.14]  
config file = /home/test/ansible.cfg  
configured module search path = [‘/home/test/ntc-ansible’]  
ansible python module location = /usr/local/lib/python3.10/dist-packages/ansible  
ansible collection location = /home/test/.ansible/collections:/usr/share/ansible/collections  
executable location = /usr/local/bin/ansible  
python version = 3.10.12 (main, Nov 4 2025, 08:48:33) [GCC 11.4.0] (/usr/bin/python3)  
jinja version = 3.1.6  
libyaml = True

The task in the Playbook:

- name: Gather facts with SNMP version 3  
snmp\_facts:  
host: ‘{{ inventory\_hostname }}’  
version: v3  
level: authPriv  
integrity: sha  
privacy: aes  
username: xxxxxxxxxxxx  
authkey: xxxxxxxxxxxxxx  
privkey: xxxxxxxxxxxxxxx  
timeout: 5  
register: output1  
tags: create

---

<div class="post-metadata">

**Author:** ![rohitthakur2590](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/rohitthakur2590/32/1922_2.png) [@rohitthakur2590](https://forum.ansible.com/u/rohitthakur2590)\
**Post date:** [January 7, 2026, 11:49am UTC](https://forum.ansible.com/t/snmp-facts-v3-get-stuck-after-running-ansible-playbook/44986/2 "2026-01-07T11:49:38Z")

</div>

Looking at the code for snmp\_facts ([community.general/plugins/modules/snmp\_facts.py at 996b7469e5b01fa7ffd5ffc01a0de0a8b9b8a4cd · ansible-collections/community.general · GitHub](https://github.com/ansible-collections/community.general/blob/996b7469e5b01fa7ffd5ffc01a0de0a8b9b8a4cd/plugins/modules/snmp_facts.py#L54)), the SNMPv3 auth algorithms it supports are limited to md5 and sha and no support for SHA-2 variants .  
I think If device is configured with snmp v3 using SHA-2 and if the playbook using integrity: sha will try SHA-1 instead. In that case the module can end in this statte.

I’d suggest double-checking the auth protocol configured on the device , and confirming whether it’s SHA-1 or SHA-2. If it’s SHA-2, this seems like a current limitation of snmp\_facts, and it may be worth opening an enhancement request in community.general to add SHA-2 support.

---

<div class="post-metadata">

**Author:** ![ali-taha](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@ali-taha](https://forum.ansible.com/u/ali-taha)\
**Post date:** [January 12, 2026, 7:19am UTC](https://forum.ansible.com/t/snmp-facts-v3-get-stuck-after-running-ansible-playbook/44986/3 "2026-01-12T07:19:17Z")

</div>

Based on the switches (C2960x and C9200L) that we are deploying in our environment, sha 1 is the default configuration . On cisco switches we cant specify the sha version.
