Hello,
I develop the modules for comware5.
They run, when are in ansible standard directoriу, for my installation it is /usr/local/Cellar/ansible/2.8.0/libexec/lib/python3.7/site-packages/ansible/
I’ve tried to move them in other directories - in ~/.ansible
at running time of ansible-playbook now I’ve got error:
File “/usr/local/Cellar/ansible/2.8.0/libexec/lib/python3.7/imp.py”, line 171, in load_source
module = _load(spec)
File “”, line 696, in _load
File “”, line 677, in _load_unlocked
File “”, line 728, in exec_module
File “”, line 219, in _call_with_frames_removed
File “/Users/modest/.ansible/plugins/action/comware5_config.py”, line 18, in
from ansible.module_utils.network.comware5.comware5 import comware5_provider_spec
ModuleNotFoundError: No module named ‘ansible.module_utils.network.comware5’
In ansible module I’ve got the string:
from ansible.module_utils.network.comware5.comware5 import comware5_provider_spec
The ansible.conf file is empty.
bob@Mac:~/.ansible$ ansible-config dump| grep MODULE_UTILS_PATH
DEFAULT_MODULE_UTILS_PATH(default) = [‘/Users/bob/.ansible/plugins/module_utils’, ‘/usr/share/ansible/plugins/module_utils’]
bob@Mac:~/.ansible$ uname -a
Darwin Mac.local 18.6.0 Darwin Kernel Version 18.6.0: Thu Apr 25 23:16:27 PDT 2019; root:xnu-4903.261.4~2/RELEASE_X86_64 x86_64
bob@Mac:~/.ansible$ tree
.
├── cp
├── modules
│ └── network
│ └── comware5
│ ├── init.py
│ ├── comware5_command.py
│ └── comware5_config.py
├── pc
├── plugins
│ ├── action
│ │ ├── comware5.py
│ │ ├── comware5_config.py
│ │ └── comware5_template.py
│ ├── cliconf
│ │ └── comware5.py
│ ├── doc_fragments
│ │ └── comware5.py
│ ├── module_utils
│ │ ├── init.py
│ │ ├── comware5.py
│ │ └── network
│ │ ├── init.py
│ │ └── comware5
│ │ ├── init.py
│ │ └── comware5.py
│ ├── netconf
│ │ └── comware5.py
│ └── terminal
│ └── comware5.py
└── tmp
15 directories, 15 files
bob@Mac:~/.ansible$
Could you please give me advice, why ansible can not import module from DEFAULT_MODULE_UTILS_PATH?
Where can be my mistake?
Regards,
Modest