Open misch42 opened 8 months ago
@misch42 hi, thanks for reporting the issue!
I'll ping the original maintainers: @QijunPan @TommyLike @edisonxiang @freesky-edward @hwDCN @niuzhenguo @xuxiaowei0512 @yanzhangi @zengchen1024 @zhongjun2
Though the chances anybody responds is not high, so I'll put the help_wanted
label and the link to the Quick-start dev guide if anyone else wants to fix this.
SUMMARY
I want to configure a huawei switch according to the ansible doc of community.network.ce_config. The task is:
This throws an error.
ISSUE TYPE
TASK [Configure top level configuration and save it] ** task path: /home/misch/huawei_configure.yml:38 The full traceback is: Traceback (most recent call last): File "/usr/lib/python3.11/site-packages/ansible/executor/task_executor.py", line 158, in run res = self._execute() ^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/ansible/executor/task_executor.py", line 629, in _execute result = self._handler.run(task_vars=vars_copy) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/ansible_collections/community/network/plugins/action/ce.py", line 56, in run result = super(ActionModule, self).run(task_vars=task_vars) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/ansible_collections/ansible/netcommon/plugins/action/network.py", line 42, in run filename, module = self._find_load_module() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/ansible_collections/ansible/netcommon/plugins/action/network.py", line 280, in _find_load_module module = importlib.import_module(context.plugin_resolved_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib64/python3.11/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1206, in _gcd_import
File "", line 1178, in _find_and_load
File "", line 1149, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "/usr/lib/python3.11/site-packages/ansible/utils/collection_loader/_collection_finder.py", line 432, in exec_module
code_obj = self.get_code(self._fullname)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/ansible/utils/collection_loader/_collection_finder.py", line 544, in get_code
self._compiled_code = compile(source=source_code, filename=filename, mode='exec', flags=0, dont_inherit=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/ansible_collections/community/network/plugins/modules/ce_config.py", line 275
if module.params['defaults']:
^
IndentationError: unindent does not match any outer indentation level
fatal: [Ansible-test-22]: FAILED! => {
"msg": "Unexpected failure during module execution: unindent does not match any outer indentation level (ce_config.py, line 275)",
"stdout": ""
}
COMPONENT NAME
community.network.ce_config
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
STEPS TO REPRODUCE
run the task above.
EXPECTED RESULTS
Set hostname on device.
ACTUAL RESULTS