sros network modules in ansible 2.7.0

Ansible newbie here. I’m trying to learn about network_cli so installed a recent version of ansible

`

ansible --version
ansible 2.7.0
config file = /etc/ansible/ansible.cfg
configured module search path = [u’/home/ubuntu/.ansible/plugins/modules’, u’/usr/share/ansible/plugins/modules’]
ansible python module location = /usr/lib/python2.7/dist-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.15rc1 (default, Apr 15 2018, 21:51:34) [GCC 7.3.0]

`

It appears the first task/commands executes ok, but as soon as I add a second task in the playbook (even a debug task) I end up with the error:

`

TASK [sros_command] ****************************************************************************************
task path: /tmp/sros.yml:7
The full traceback is:
Traceback (most recent call last):
File “/usr/bin/ansible-connection”, line 290, in main
messages.extend(conn.update_play_context(pc_data))
File “/usr/lib/python2.7/dist-packages/ansible/module_utils/connection.py”, line 173, in rpc
raise ConnectionError(to_text(msg, errors=‘surrogate_then_replace’), code=code)
ConnectionError: ‘Connection’ object has no attribute ‘reset_history’

fatal: [sr]: FAILED! => {
“msg”: “‘Connection’ object has no attribute ‘reset_history’”
}

`

Even trying to revert back to using ‘provider’ and ‘connection: local’ fails with a similar error.

Thanks,
DC

Hi,
Could you please raise a bug at https://github.com/ansible/ansible/issues/new/choose and include the two tasks (and any group_vars/inventory, etc)

Kind regards,
gundalow

Here is a perfect example of the bug, also using Ansible 2.7.0:

  • name: TWO TASKS BREAKS SROS
    hosts: sros
    connection: local
    gather_facts: no

vars_files:

  • group_vars/all

tasks:

  • name: Get Router system name
    sros_command:
    provider: “{{ router_auth }}”
    commands: show system information | match “System Name”
    register: system_name

  • debug:
    var: system_name

  • name: Configure VPLS service
    sros_config:
    provider: “{{ router_auth }}”
    parents:

  • configure service

  • vpls “{{ internet_vpls_id }}” customer 1 create

  • allow-ip-int-bind
    lines: exit
    register: vpls

  • debug:
    var: vpls

The issue is fixed by PR #49174 and the fix is available in Ansible version 2.7.5Please retest with 2.7.5 version and check if the issue is still seen.

Regards,
Ganesh

I has similar issue with 7750 TiMOS-C-14.0.R5 and Ansible 2.7.0
Upgrade up to 2.7.5 has fixed the issue

Cheers