Re: [ansible-devel] Re: Cannot import module from ~/.ansible/plugins/module_utils

2019-06-28 Thread Modest Sokolov
Jordan, thanks a lot. https://github.com/ansible/ansible/issues/58490 Regards, Modest Sokolov пт, 28 июн. 2019 г. в 01:20, Jordan Borean : > Action plugins can reference ansible.module_utils but only for ones in the > base Ansible package. Module can take advantage of the lookup path as it is

[ansible-devel] Re: Cannot import module from ~/.ansible/plugins/module_utils

2019-06-27 Thread Jordan Borean
Action plugins can reference ansible.module_utils but only for ones in the base Ansible package. Module can take advantage of the lookup path as it is built for you automatically and sent across to the remote host. Feel free to raise a PR to the Ansible docs at

[ansible-devel] Re: Cannot import module from ~/.ansible/plugins/module_utils

2019-06-27 Thread Modest Sokolov
Hello. I was able to solve problem. It seems, *the rule* from documentation "The ansible.module_utils namespace is not a plain Python package: it is constructed dynamically for each task invocation, by extracting imports and resolving those matching the namespace against a search path

[ansible-devel] Re: Cannot import module from ~/.ansible/plugins/module_utils

2019-06-07 Thread Modest Sokolov
If in the code I change *from ansible.module_utils.network.comware5.comware5 import comware5_provider_spec* to *from ansible.module_utils.network import comware5_provider_spec* The ansible-playbook ends with: File "/Users/bob/.ansible/plugins/action/comware5_config.py", line 18, in

[ansible-devel] Re: Cannot import module from ~/.ansible/plugins/module_utils

2019-06-07 Thread Modest Sokolov
bob@Mac:~/.ansible$ ansible --version ansible 2.8.0 config file = /Users/bob/Work/Ansible/lab/ansible.cfg configured module search path = ['/Users/bob/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location