zahodi / ansible-mikrotik

Mikrotik module collection for ansible
Apache License 2.0
96 stars 33 forks source link

Move "pythonlibs" deps to module_utils #4

Closed senorsmile closed 6 years ago

senorsmile commented 7 years ago

This will allow NOT add ENV bars to define the path for shared modules.

This also requires Ansible >= 2.3.0

amatamalas commented 6 years ago

Hi, I was thinking on helping with this issue. We could use the module_utils configuration parameter to add the current pythonlibs as part of the Ansible modules utils path. Then it would be a matter of changing the imports for the mt_api and mt_common in the library and test directories. In order to simplify the testing and usage, a simple local ansible.cfg file would be enough. This way if you move the module somewhere else the only thing you have to do is to change the ansible.cfg file and if the modules goes into the Ansible official repository it will work straight away. What do you think about it?

zahodi commented 6 years ago

@amatamalas that should work. Feel free to submit a PR if you have something written up.

amatamalas commented 6 years ago

@zahodi Sure I will.