Hey Sam

I never tried to import ants directly. Depending on your use case, it might be 
easier to 1) call it using subprocess or 2) copy the inventory 
file<https://github.com/ANTS-Framework/ants/blob/master/antslib/inventory/inventory_ad>
 and adapt it to your needs.

Regards,
Balz

On 4 Jan 2019, at 11:40, Samer Odeh 
<samer...@gmail.com<mailto:samer...@gmail.com>> wrote:

Hi,

Thanks for sharing, I spent sometime trying to make it work ... but I am 
getting an error about Python module:

# python
Python 2.7.5 (default, Oct 30 2018, 23:45:53)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import ants


but I still get:

Traceback (most recent call last):
  File "/tmp/tt", line 32, in <module>
    from antslib import configer
ImportError: No module named antslib

any ideas ?

Thanks
Sam

On Wednesday, February 14, 2018 at 9:02:33 AM UTC+1, 
balz.as...@unibas.ch<http://unibas.ch> wrote:
We do exactly that: We run ansible in pull mode with AD as inventory.

Maybe you can take a look at the dynamic inventory script we use: 
https://github.com/ANTS-Framework/ants/blob/master/antslib/inventory/inventory_ad
(Because it is used for ansible-pull, it will only return the current host, but 
it should give you some ideas.)

Am Dienstag, 13. Februar 2018 02:50:31 UTC+1 schrieb Aaron K:
Does anyone have code that can pull a dynamic inventory from list of AD OUs?  
Want to use the windows_update module to patch our servers only in specific OUs.

Maybe I missed it, but I don't see Windows Active Directory inventory here:  
https://github.com/ansible/ansible/tree/devel/contrib/inventory

--
You received this message because you are subscribed to a topic in the Google 
Groups "Ansible Project" group.
To unsubscribe from this topic, visit 
https://groups.google.com/d/topic/ansible-project/dYdDwewYf7c/unsubscribe.
To unsubscribe from this group and all its topics, send an email to 
ansible-project+unsubscr...@googlegroups.com<mailto:ansible-project+unsubscr...@googlegroups.com>.
To post to this group, send email to 
ansible-project@googlegroups.com<mailto:ansible-project@googlegroups.com>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/7fd62efb-c3df-471d-b984-a8ca580f4148%40googlegroups.com<https://groups.google.com/d/msgid/ansible-project/7fd62efb-c3df-471d-b984-a8ca580f4148%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

-- 
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 post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/9DF9ABDE-CC08-4277-98AB-63380081647E%40unibas.ch.
For more options, visit https://groups.google.com/d/optout.

Reply via email to