mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
27 lines
734 B
YAML
27 lines
734 B
YAML
|
---
|
||
|
- 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
|