ansible/test/integration/targets/win_snmp/tasks/cleanup_using_module.yml
Michael Cassaniti 10af3874b5 win_snmp: Initial commit (#45710)
* win_snmp: Initial commit

* win_snmp: Better handling of lists

* win_snmp: Documentation fixes

* win_snmp: Updated documentation to match parameters

* win_snmp: Added integration tests

* win_snmp: Fixed typo in test

* win_snmp: Adjusted parameter checks to match documentation

* win_snmp: Updated option descriptions to be full sentences

* win_snmp: Better type checking and output suppression

* win_snmp: Fixed unset managers and communities

* win_snmp: Fixed skipping default registry keys

* win_snmp: Migrated to using add/set/remove action from replace

* win_snmp: Fixed check mode

* win_snmp: Fixed setting action and documentation. Expanded tests.

* win_snmp: Efficiency changes and documentation cleanup
  * Added example of explicitly setting an empty set of managers to
documentation
  * Made sure set will only remove items if there is a list of items
provided. This list can be of length 0
  * Improved efficiency in selecting next index for SNMP manager
  * Updated tests

* win_snmp: Added output of permitted managers and community strings

* win_snmp: Documentation fix
2018-11-22 06:55:10 +10:00

26 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