/
03-nslookup-test.yml
34 lines (30 loc) · 998 Bytes
/
03-nslookup-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
---
- name: Check SRV response on Linux side.
hosts: ipaserver
gather_facts: no
tasks:
- name: Retrieve _ldap._tcp SRV records for Linux and Windows domains.
command: nslookup
args:
stdin: |
set type=srv
_ldap._tcp.ad.ipa.test
_ldap._tcp.lin.ipa.test
register: nslookup
failed_when: "'389 {{ ipaserver_hostname }}.' not in nslookup.stdout or '389 {{ winserver_hostname}}.' not in nslookup.stdout"
changed_when: false
#-----
- name: Check SRV response on Windows side.
hosts: winserver
gather_facts: no
tasks:
- name: Retrieve _ldap._tcp SRV records for Linux and Windows domains.
ansible.windows.win_command: nslookup
args:
stdin: |
set type=srv
_ldap._tcp.ad.ipa.test
_ldap._tcp.lin.ipa.test
register: nslookup
failed_when: "'_ldap._tcp.{{ ipaserver_domain }}\tSRV' not in nslookup.stdout or '_ldap._tcp.{{ winserver_domain }}\tSRV' not in nslookup.stdout"
changed_when: false