Re: [ansible-devel] inheriting from other modules

2021-01-22 Thread Brian Coca
Just to confirm, what Andreas describes is correct, any 'shared' code must be in module_utils, modules cannot rely on other module's code as ONLY the current module code (+ module_utils references) is shipped to the remote. -- -- Brian Coca -- You received this message because you are

Re: [ansible-devel] inheriting from other modules

2021-01-22 Thread SZIGETVÁRI János
Thanks Andi for the advice! I will try modifying a copy of command.py then. Have a great day! János Andreas Härpfer ezt írta (időpont: 2021. jan. 22., P 16:23): > > > On 22. Jan 2021, at 14:28, SZIGETVÁRI János > wrote: > > > > Technically you are right, it would be possible to always prepend

Re: [ansible-devel] inheriting from other modules

2021-01-22 Thread Andreas Härpfer
> On 22. Jan 2021, at 14:28, SZIGETVÁRI János wrote: > > Technically you are right, it would be possible to always prepend the extra > command, and this being a POC is also be an argument in support of this > option. (If I end up not finding an easy way of doing this, then I may end up >

Re: [ansible-devel] inheriting from other modules

2021-01-22 Thread Andreas Härpfer
On 22. Jan 2021, at 11:26, János Szigetvári wrote: > > > Hi, > > In a POC project I would need to create a new Ansible module that would need > to work just like the command module, with the only difference being that it > would need to prepend a command to the command line passed to it. >

[ansible-devel] inheriting from other modules

2021-01-22 Thread János Szigetvári
Hi, In a POC project I would need to create a new Ansible module that would need to work just like the command module, with the only difference being that it would need to prepend a command to the command line passed to it. How would I need to get started with this? If we were talking in OOP