troubleshooting Question

I need help with an Ansible role to join Linux servers to a Windows Domain in AWS.

Avatar of wbens
wbens asked on
LinuxWindows OSAWS* Ansible
7 Comments2 Solutions11 ViewsLast Modified:

Hello Experts:
 
I am writing an Ansible role that connects Linux servers to a Windows Domain in AWS.  However, I am getting nowhere.  The requirement is to use the System Security Services Daemon (SSSD) and realm.  
 
This is my Ansible code in tasks/main.yml (this is the only place where I have code):


---
# tasks file for Join_Linux_to_AD # - name: Install Required Packages   yum:           name:           - realmd           - sssd           - oddjob           - oddjob-mkhomedir           - adcli           - krb5-workstation           - samba-common-tools           state: latest - name: Join Linux Server to AD   shell: |           echo "myP@ssword" | realm join -v -U Administrator WILLIE.COM           realm list   register: realm_results - name: See the Results from Joining   debug:           msg: "{{ realm_results }}"


I have the IP (172.31.82.130) of the Windows Domain in /etc/resolv.conf of the Linux server:


# Generated by NetworkManager
search ec2.internal nameserver 172.31.82.130 nameserver 172.31.0.2



This is the results of my Ansible role as written above:


PLAY [all] *********************************************************************
TASK [Gathering Facts] ********************************************************* ok: [172.31.90.156] TASK [Join_Linux_to_AD : Install Required Packages] **************************** ok: [172.31.90.156] TASK [Join_Linux_to_AD : Join to AD if Server is REHL8.4] ********************** changed: [172.31.90.156] TASK [Join_Linux_to_AD : See the Results from Joining] ************************* ok: [172.31.90.156] => {     "msg": {         "changed": true,         "cmd": "echo \"thinkpad@102\" | realm join -v -U Administrator WILLIE.COM\nrealm list\n",         "delta": "0:02:14.885949",         "end": "2021-12-16 16:09:07.422984",         "failed": false,         "rc": 0,         "start": "2021-12-16 16:06:52.537035",         "stderr": " * Resolving: _ldap._tcp.willie.com\n * Resolving: willie.com\n * Performing LDAP DSE lookup on: 198.58.118.167\n * Performing LDAP DSE lookup on: 173.255.194.134\n * Performing LDAP DSE lookup on: 96.126.123.244\n ! Can't contact LDAP server\n * Performing LDAP DSE lookup on: 72.14.185.43\n ! Can't contact LDAP server\n * Performing LDAP DSE lookup on: 72.14.178.174\n ! Can't contact LDAP server\n * Performing LDAP DSE lookup on: 45.79.19.196\n ! Discovery timed out after 15 seconds\nrealm: No such realm found\nPlease check\n    https://red.ht/support_rhel_ad \nto get help for common issues.",         "stderr_lines": [             " * Resolving: _ldap._tcp.willie.com",             " * Resolving: willie.com",             " * Performing LDAP DSE lookup on: 198.58.118.167",             " * Performing LDAP DSE lookup on: 173.255.194.134",             " * Performing LDAP DSE lookup on: 96.126.123.244",             " ! Can't contact LDAP server",             " * Performing LDAP DSE lookup on: 72.14.185.43",             " ! Can't contact LDAP server",             " * Performing LDAP DSE lookup on: 72.14.178.174",             " ! Can't contact LDAP server",             " * Performing LDAP DSE lookup on: 45.79.19.196",             " ! Discovery timed out after 15 seconds",             "realm: No such realm found",             "Please check",             "    https://red.ht/support_rhel_ad ",             "to get help for common issues."         ],         "stdout": "",         "stdout_lines": []     } } PLAY RECAP ********************************************************************* 172.31.90.156              : ok=4    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0  


None of these IPs:

198.58.118.167
173.255.194.134
96.126.123.244
72.14.185.43
72.14.178.174
45.79.19.196


are known to me. I do not know where they are coming from and/or why.


This is a picture of how my Windows Domain controller looks like (this is a test controller in AWS):



This environment is in AWS. 

Thanks!




ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 2 Answers and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros