cancel
Showing results for 
Search instead for 
Did you mean: 
rrathbun
Mission Specialist
Mission Specialist
  • 5,771 Views

Ansible AAP 2.4 Microsoft LDAP Plugin

Jump to solution

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.

Labels (3)
14 Replies
just45
Cadet
Cadet
  • 2,203 Views

Yep that must be selected as correct answer.

Chetan_Tiwary_
Community Manager
Community Manager
  • 2,200 Views

Which one @just45 !

0 Kudos
rrathbun
Mission Specialist
Mission Specialist
  • 4,262 Views

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

0 Kudos
android
Mission Specialist
Mission Specialist
  • 1,796 Views

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

 

0 Kudos
android
Mission Specialist
Mission Specialist
  • 815 Views

Using AAP 2.4 and the collection / roles for microsoft.ad.ldap plugin is in my git but the credential type is being ignored it only works with username and password in the yaml file any suggestions?

0 Kudos
Join the discussion
You must log in to join this conversation.