So I now I have a working microsoft.ad.ldap.yaml dynamic inventory script. But my question is how do I export my findings to a person that needs a list of linux machines based on certain attributes ?
Thanks. On Friday, February 2, 2024 at 12:46:37 PM UTC-6 Andy Magana wrote: > Help with how to configure microsoft ad ldap inventory. > > ---------- Forwarded message --------- > From: Andy Magana <Unknown> > Date: Friday, February 2, 2024 at 11:53:33 AM UTC-6 > Subject: Re: microsoft dynamic inventory > To: Ansible Development <Unknown> > > > I just added an active directory and tested it from my ansible controller > using ldapsearch and that works so now i know ldap can be reached from the > controller to the active directory. > > I just tried to run the yaml file according to what I understand ( i have > a comprehension problem ) I get this output. > > [ansible@ct01 ~]$ ansible-inventory -i inventories/microsoft.ad.ldap.yml > --list > [WARNING]: * Failed to parse > /home/ansible/inventories/microsoft.ad.ldap.yml with script plugin: problem > running /home/ansible/inventories/microsoft.ad.ldap.yml --list ([Errno 8] > Exec > format error: '/home/ansible/inventories/microsoft.ad.ldap.yml') > [WARNING]: * Failed to parse > /home/ansible/inventories/microsoft.ad.ldap.yml with auto plugin: > Configuration file does not specify default realm -1765328160 > [WARNING]: * Failed to parse > /home/ansible/inventories/microsoft.ad.ldap.yml with yaml plugin: Plugin > configuration YAML file, not YAML inventory > [WARNING]: * Failed to parse > /home/ansible/inventories/microsoft.ad.ldap.yml with ini plugin: Invalid > host pattern 'plugin:' supplied, ending in ':' is not allowed, this > character is > reserved to provide a port. > [WARNING]: * Failed to parse > /home/ansible/inventories/microsoft.ad.ldap.yml with > ansible_collections.microsoft.ad.plugins.inventory.ldap plugin: > Configuration file does not specify > default realm -1765328160 > [WARNING]: Unable to parse /home/ansible/inventories/microsoft.ad.ldap.yml > as an inventory source > [WARNING]: No inventory was parsed, only implicit localhost is available > { > "_meta": { > "hostvars": {} > }, > "all": { > "children": [ > "ungrouped" > ] > } > } > [ansible@ct01 ~]$ > > > > [image: dynamic-error.png] > > Just forwarding to the right group for any help. > > On Friday, February 2, 2024 at 11:30:15 AM UTC-6 Andy Magana wrote: > > Trying to this to work any help would be great, I just can't understand > where the yaml file ( microsoft.ad.ldap.yaml file ) needs to be at and the > python script that comes with the collection as well where does it go ? > > What is supposed to be inside my inventory file ? > > I have tried to run ansible-inventory -i microsoft.ad.ldap.yaml and I just > errors that this is not a yaml file. > > Thanks for any help > > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/96b74ae7-759a-45a6-8537-d530783966e3n%40googlegroups.com.