Hi,
I want to add windows clients to an Active Directory domain. The clients are getting IP addresses from dhcp and they are not in DNS. Should I write a playbook to query the dhcp server with the known hostnames to generate an inventory file, and then write another playbook to add them to the domain? Any better approaches?
If Active Directory and the clients are configured properly, the Active Directory DNS should be updated automatically. I do not know the details.
Thanks for the reply. This is for machines on the network that are NOT joined to the domain yet, so they do not have a DNS entry.
I took the approach of running a win_shell task against the dhcp server and then using in-memory inventory with add_host to further configure the hosts.
I think a better approach might be to use custom inventory script to query the windows dhcp server instead of using in-memory invenotry. Anybody have experience writing custom inventory script querying a windows box?