On Mar 23, 2016 6:48 AM, "夏恺(Xia Kai)" <[email protected]> wrote:
>
> I'm working on a similar problem, and I have to write an action plugin
for it. As far as I know, and as much as I understand, there is no out of
the box way to do this.
>
You can copy the file into the module_utils directory in your ansible
install.  Then you should be able to use it similar to how most ansible
modules use the basic.py module listed there.  Note that we're making some
changes to how this works for 2.1 and (maybe for 2.1 but more likely for
2.2 due to the amount of time left before we want to release 2.1) will be
looking at enabling a user directory where these sorts of small, custom
libraries can live.  (The new module loader code is talked about here:
https://groups.google.com/forum/m/#!msg/ansible-project/0bwHEFfKOro/meU337AxCQAJ
I don't highlight user directories for custom code in the posts about it
because the timing means that additional feature likely won't make it into
2.1)

-Toshio
>
> On Tuesday, March 22, 2016 at 2:41:07 AM UTC+8, Alexey Wasilyev wrote:
>>
>> Hello!
>>
>> I am writing a set of custom ansible modules, that uses some shared code.
>> And cant find a right way how this can be organised. Where I should put
my custom python library under current catalog so it can be imported by my
modules?
>>
>> I don't want to makes "official" library, available via pip, and I don't
want to copy it manually out of current playbook tree.
>>
>>
>> Alexey
>
> --
> 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/bced9465-3175-4743-ade6-a1f071a6c5c4%40googlegroups.com
.
>
> 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 [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/CAG9juEryXUknW-46v%2BCqsVbnMGLaC21JuG-8g9h%3D2EvjoP0uRQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to