You can also place them in a directory named library/ next to your playbooks- this is usually the way I tell people to do it, so your modules can be versioned alongside your content.
The .py doc file is not required anymore (it was at one point), but strongly encouraged so that ansible-doc will work for your modules the same way as for "in the box" modules. On Thursday, July 21, 2016 at 9:15:41 AM UTC-7, J Hawkesworth wrote: > > You should just be able to put your custom modules in your > /etc/ansible/library folder and they will become available to your > playbooks. > > I think you have to have a module_name.ps1 and a module_name.py in > /etc/ansible/library (the .py file is just used for documentation, but I > think ansible might expect it. > > Also I think module names need to be unque, so make sure your module > doesn't have the same file name as an existing module (unless you want your > custom module to be used instead of the supplied module - modules in > /etc/ansible/library are used if present. > > Hope this helps. > > Jon > > On Wednesday, July 20, 2016 at 3:53:19 PM UTC+1, Deepak Kumar wrote: >> >> Hi, >> >> I am trying to develop ansible modules for windows target machines. I >> don't know how to import them in my playbooks. Should I need to edit the >> config file? Can anybody help me? >> > -- 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 [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/afaa08b4-b87b-4bd4-8a10-29c517426d2c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
