Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LAB 01 - Ansible Basics: error #1

Open
mzakkar0 opened this issue Nov 1, 2020 · 3 comments
Open

LAB 01 - Ansible Basics: error #1

mzakkar0 opened this issue Nov 1, 2020 · 3 comments

Comments

@mzakkar0
Copy link

mzakkar0 commented Nov 1, 2020

**---

  • name: Configure description on Ethernet1
    hosts: DC2-LEAF1A
    connection: network_cli
    gather_facts: false
    vars:
    ansible_network_os: eos
    ansible_become: yes
    ansible_become_method: enable
    tasks:
    • name: Configure description on loopback10
      eos_config:
      lines:
      • description TEST-Lab01
        parents: interface loopback10
    • name: Get switch loopback10 interface configuration
      eos_command:
      commands: "show run interface loopback10"
      register: loopback10
    • name: Print loopback10 new configuration
      debug:
      msg: " {{ ethernet1.stdout_lines }} "**

I'm receiving this error:
TASK [Configure description on loopback10] ********************************************************************************************************************************
Sunday 01 November 2020 18:18:05 -0500 (0:00:00.039) 0:00:00.039 *******
ok: [DC2-LEAF1A]
TASK [Get switch loopback10 interface configuration] **********************************************************************************************************************

Sunday 01 November 2020 18:18:09 -0500 (0:00:03.393) 0:00:03.432 *******

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ansible.module_utils.connection.ConnectionError: incomplete token (at token 1: 'run')

fatal: [DC2-LEAF1A]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n File "/Users/817101629/.ansible/tmp/ansible-local-123618ku1tg3k/ansible-tmp-1604272690.1691651-12402-56373130940360/AnsiballZ_eos_command.py", line 102, in \n _ansiballz_main()\n File "/Users/817101629/.ansible/tmp/ansible-local-123618ku1tg3k/ansible-tmp-1604272690.1691651-12402-56373130940360/AnsiballZ_eos_command.py", line 94, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File "/Users/817101629/.ansible/tmp/ansible-local-123618ku1tg3k/ansible-tmp-1604272690.1691651-12402-56373130940360/AnsiballZ_eos_command.py", line 40, in invoke_module\n runpy.run_module(mod_name='ansible.modules.network.eos.eos_command', init_globals=None, run_name='main', alter_sys=True)\n File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 188, in run_module\n fname, loader, pkg_name)\n File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 82, in _run_module_code\n mod_name, mod_fname, mod_loader, pkg_name)\n File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code\n exec code in run_globals\n File "/var/folders/q0/92fg6g7s1bv6kgfdcgfjwt0c0000gp/T/ansible_eos_command_payload_3tIUu2/ansible_eos_command_payload.zip/ansible/modules/network/eos/eos_command.py", line 248, in \n File "/var/folders/q0/92fg6g7s1bv6kgfdcgfjwt0c0000gp/T/ansible_eos_command_payload_3tIUu2/ansible_eos_command_payload.zip/ansible/modules/network/eos/eos_command.py", line 219, in main\n File "/var/folders/q0/92fg6g7s1bv6kgfdcgfjwt0c0000gp/T/ansible_eos_command_payload_3tIUu2/ansible_eos_command_payload.zip/ansible/module_utils/network/eos/eos.py", line 638, in run_commands\n File "/var/folders/q0/92fg6g7s1bv6kgfdcgfjwt0c0000gp/T/ansible_eos_command_payload_3tIUu2/ansible_eos_command_payload.zip/ansible/module_utils/network/eos/eos.py", line 483, in run_commands\n File "/var/folders/q0/92fg6g7s1bv6kgfdcgfjwt0c0000gp/T/ansible_eos_command_payload_3tIUu2/ansible_eos_command_payload.zip/ansible/module_utils/network/eos/eos.py", line 451, in run_queue\n File "/var/folders/q0/92fg6g7s1bv6kgfdcgfjwt0c0000gp/T/ansible_eos_command_payload_3tIUu2/ansible_eos_command_payload.zip/ansible/module_utils/connection.py", line 185, in rpc\nansible.module_utils.connection.ConnectionError: incomplete token (at token 1: 'run')\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}

PLAY RECAP ****************************************************************************************************************************************************************

DC2-LEAF1A : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0


my target switch runs VEOS-4.22.6M

Please advise

@titom73
Copy link
Contributor

titom73 commented Nov 3, 2020

Hello @mzakkar0

Thank you for reaching out to us.
This repository provides a list of labs we use in our TOI and it is AVD oriented.

As I understand, your issue seems to be related to arista.eos collection supported by ansible network team and issue should be open there.

Regards,

@mzakkar0
Copy link
Author

mzakkar0 commented Nov 7, 2020

Hi Thomas,

Thank you for your reply.
I have faced this issue on this repo:
https://github.com/arista-netdevops-community/ansible-cvp-avd-toi/blob/master/labs/lab01-ansible-basics/playbook.ethernet_descr.yml

I followed the steps as on Readme but I got that error.
I expect that script to be working on avd collection, since that it's posted here...
Please advise or remove it from the sample labs because this is really confusing

Thank you

@titom73
Copy link
Contributor

titom73 commented Nov 8, 2020

@mzakkar0

  • Have you updated IP addresses in your inventory?
  • Have you configured ansible_user and ansible_password in your inventory for lab01?

From your logs:

ConnectionError: incomplete token

This TOI is expected to be delivered on-premise and address different topics from ansible basic (out of AVD) to avd and cvp collections. Thus lab01 is something related to eos_ collection.

Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants