rrathbun
Mission Specialist
Mission Specialist
  • 3,437 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)
13 Replies
just45
Cadet
Cadet
  • 1,113 Views

Yep that must be selected as correct answer.

Chetan_Tiwary_
Moderator
Moderator
  • 1,110 Views

Which one @just45 !

0 Kudos
rrathbun
Mission Specialist
Mission Specialist
  • 1,930 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
  • 706 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
Join the discussion
You must log in to join this conversation.