0

I have a Huawei siwtch S5720 that does not works with the ce_config module. I'm trying to use the cli_config module but I'm getting the error below:

"module_stderr": "Traceback (most recent call last):\n  File \"/root/.ansible/tmp/ansible-local-26049b1Tdon/ansible-tmp-1618582318.53-26129-214397522450449/AnsiballZ_cli_config.py\", line 102, in <module>\n    _ansiballz_main()\n  File \"/root/.ansible/tmp/ansible-local-26049b1Tdon/ansible-tmp-1618582318.53-26129-214397522450449/AnsiballZ_cli_config.py\", line 94, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/root/.ansible/tmp/ansible-local-26049b1Tdon/ansible-tmp-1618582318.53-26129-214397522450449/AnsiballZ_cli_config.py\", line 40, in invoke_module\n    runpy.run_module(mod_name='ansible.modules.network.cli.cli_config', init_globals=None, run_name='__main__', alter_sys=True)\n  File \"/usr/lib64/python2.7/runpy.py\", line 176, in run_module\n    fname, loader, pkg_name)\n  File \"/usr/lib64/python2.7/runpy.py\", line 82, in _run_module_code\n    mod_name, mod_fname, mod_loader, pkg_name)\n  File \"/usr/lib64/python2.7/runpy.py\", line 72, in _run_code\n    exec code in run_globals\n  File \"/tmp/ansible_cli_config_payload_VWgMXl/ansible_cli_config_payload.zip/ansible/modules/network/cli/cli_config.py\", line 400, in <module>\n  File \"/tmp/ansible_cli_config_payload_VWgMXl/ansible_cli_config_payload.zip/ansible/modules/network/cli/cli_config.py\", line 366, in main\n  File \"/tmp/ansible_cli_config_payload_VWgMXl/ansible_cli_config_payload.zip/ansible/module_utils/connection.py\", line 185, in __rpc__\nansible.module_utils.connection.ConnectionError: [Errno -2] Name or service not known\n",
"module_stdout": "",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"rc": 1

Any idea of what I'm doing wrong? Here below my playbook created in the simpler mode:

  • name: "Create configuration file" hosts: switch1 tasks:
    • set_fact: cmd: "{{ lookup('template', './config/config.j2') }}"

    • name: "Switch configuration." ce_config: src: "{{ lookup('template', './config/config.j2') }}"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.