Does anyone here know how to manipulate the "name" field in the inventory when using the LDAP plugin with Ansible Automation Controller? I have the plugin working fine, thanks to Zack and this article Ansible Inventory: Microsoft AD Plugin (autodotes.com)
The import pulls the hostname into the name field, and I wanted the FQDN, but I am unsure how to manipulate it.
Yep that must be selected as correct answer.
Which one @just45 !
Ultimately this is how I ended up solving this:
I setup my microsoft.ad.ldap.yml file to look like below, and it returned the FQDN as desired.
plugin: microsoft.ad.ldap
attributes:
inventory_hostname: ansible_host
Can't get this to work.
Using Python3.11 my error is Failed to parse /home/myadmin/.ansible/microsoft.ad.ldap.yaml with ansible_collections.microsoft.ad.plugins.inventory.ldap plugin: Failed to imort required sansldap and pyspnego on COMPUTER-NAME's Python /usr/bin/Python3.11
When I do a pip3.11 list those dependencies are there:
dnspython 2.5.0
pyspnego 0.10.2
sansldap 0.1.0
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.