summaryrefslogtreecommitdiff
path: root/test/integration/targets/win_snmp/tasks/output_only.yml
blob: 7115da45d200b2ae10a7a67bdc83e6e9e38af18b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
---
  # Already tested
  - name: Add an SNMP manager and an SNMP community
    win_snmp:
      action: add
      community_strings:
        - snmp-cleanup
      permitted_managers:
        - 192.168.1.1

  - name: Run without options
    register: snmp_no_options
    win_snmp:

  - name: Assert no changes occurred when no options provided
    assert:
      that:
        - not snmp_no_options.changed

  - name: Assert community strings and permitted managers are correctly returned
    assert:
      that:
        - "'snmp-cleanup' in snmp_no_options.community_strings"
        - "'192.168.1.1' in snmp_no_options.permitted_managers"