Debian Codegraph @

ansible_collections/lowlydba/sqlserver/tests/integration/targets/win_spn/tasks/main.yml

raw
1 ---
2 - name: Var block
3 vars:
4 service_account: "NT SERVICE\\MSSQLSERVER"
5 property: "msDS-AllowedToDelegateTo"
6 module_defaults:
7 lowlydba.sqlserver.spn:
8 computer: "{{ sqlserver_instance }}"
9 service_account: "{{ service_account }}"
10 tags: ["spn"]
11 block:
12 # Super limited testing below; no AD available on Github runners
13 # and with how simple this module is, its not worth the cost
14 # to implement a robust solution.
15 # - name: Set SPN
16 # lowlydba.sqlserver.spn:
17 # register: result
18 # - assert:
19 # that:
20 # - result.data.Name != None
21 # - result.data.ServiceAccount == service_account
22 # - result.data.Property == property
23 # - result.data.IsSet is true
24 # - result.data.Notes == "Successfully added SPN"
25 # - result is changed
26
27 - name: Remove spn
28 lowlydba.sqlserver.spn:
29 state: "absent"
30 register: result
31 - assert:
32 that:
33 # - result.data.Name != None
34 # - result.data.ServiceAccount == service_account
35 # - result.data.Property == property
36 # - result.data.IsSet is false
37 # - result.data.Notes == "Successfully removed SPN"
38 - result is not changed