Debian Codegraph @

ansible_collections/microsoft/ad/tests/integration/targets/inventory_ldap/main.yml

raw symbols SCIP
1 - name: run microsoft.ad.ldap tests
2 hosts: windows
3 gather_facts: false
4
5 tasks:
6 - name: setup domain controller
7 import_role:
8 name: ../../setup_domain
9
10 - name: setup domain certificates
11 import_role:
12 name: setup_certificate
13 vars:
14 dc_name: '{{ setup_domain_info.output[0].dnsHostName }}'
15 cert_path: /tmp/microsoft.ad-{{ inventory_hostname }}
16
17 - name: create KDS root key if not present
18 ansible.windows.win_powershell:
19 error_action: stop
20 script: |
21 $Ansible.Changed = $false
22 if (-not (Get-KdsRootKey)) {
23 Add-KdsRootKey -EffectiveTime ((Get-Date).AddHours(-10))
24 $Ansible.Changed = $true
25 }
26 become: true
27 become_method: runas
28 become_user: SYSTEM
29
30 - name: run tests
31 import_role:
32 name: test
33 vars:
34 ldap_server: '{{ ansible_host | default(inventory_hostname) }}'
35 ldap_user: ldap-test@{{ domain_realm }}
36 ldap_pass: '{{ domain_password }}'
37 ldap_user_cert: /tmp/microsoft.ad-{{ inventory_hostname }}/user.pfx
38 ldap_ca_cert: /tmp/microsoft.ad-{{ inventory_hostname }}/ca.pem