Re: [ansible-project] Re: include custom python library from custom module

2016-03-23 Thread Toshio Kuratomi
On Mar 23, 2016 6:48 AM, "夏恺(Xia Kai)" 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

[ansible-project] Re: include custom python library from custom module

2016-03-23 Thread Xia Kai
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. On Tuesday, March 22, 2016 at 2:41:07 AM UTC+8, Alexey Wasilyev wrote: > > Hello! > > I am writing a set of custom ansible

[ansible-project] Re: include custom python library from custom module

2016-03-23 Thread Mike Biancaniello
duh, right. It works for connection: local, but not for remote targets. Maybe have a task that copies it to a tmp dir on the target and then append that to sys.path in your module? On Wednesday, March 23, 2016 at 7:43:19 AM UTC-4, Uditha Desilva wrote: > > Does that really work to copy over the

[ansible-project] Re: include custom python library from custom module

2016-03-23 Thread Uditha Desilva
Does that really work to copy over the dependent libraries to the target systems? On Tuesday, 22 March 2016 17:13:38 UTC, Mike Biancaniello wrote: > > You can put them in the same or sub dir as your modules. Or, you can put > them anywhere, just append the path in the module. However, if you

[ansible-project] Re: include custom python library from custom module

2016-03-22 Thread Mike Biancaniello
You can put them in the same or sub dir as your modules. Or, you can put them anywhere, just append the path in the module. However, if you want multiple modules in multiple roles to share the same libs, then things get tricky. I've done that by appending '../../pylibs/' to my sys.path to get

[ansible-project] Re: include custom python library from custom module

2016-03-22 Thread Uditha Desilva
Given my understanding of the way Ansible bundles up modules, I am not sure that will work. You may need to install your custom python libraries on each of your target systems. On Monday, 21 March 2016 18:41:07 UTC, Alexey Wasilyev wrote: > > Hello! > > I am writing a set of custom ansible