1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/test/integration/targets/win_snmp/tasks/cleanup_using_module.yml

27 lines
734 B
YAML
Raw Normal View History

---
- name: Set no SNMP community or SNMP manager
register: snmp_cleanup
win_snmp:
action: set
community_strings: []
permitted_managers: []
- name: Check registry for no SNMP community
register: snmp_cleanup_reg_community
win_reg_stat:
path: "{{ valid_communities_key }}"
name: snmp-cleanup
- name: Check registry for no SNMP manager
register: snmp_cleanup_reg_manager
win_reg_stat:
path: "{{ permitted_managers_key }}"
name: 1
- name: Asset SNMP set operation results in no remaining SNMP details
assert:
that:
- snmp_cleanup.changed
- snmp_cleanup_reg_community.exists == false
- snmp_cleanup_reg_manager.exists == false