ansible-networking-collections icon indicating copy to clipboard operation
ansible-networking-collections copied to clipboard

Cannot use cli_command when VSR does not have license installed

Open jurajama opened this issue 3 years ago • 0 comments

I'm using nokia.sros collection for managing VSR release 19.10.R3. The ansible_network_os mode is nokia.sros.light.

  • Ansible version is 2.9.19 running with python 3.8.8 on CentOS-8.3 based Docker container.
  • ansible.netcommon version 2.0.1
  • nokia.sros version 1.6.0

Initially when the VSR VM is started, it will not have a license. Then I transfer the license file to VSR (using Nokia Centralized License Manager application) and try to reboot VSR to apply the license using task:

- name: Reboot VSR VM
  cli_command:
    command: "admin reboot now"

That fails with:

fatal: [xxxxxxxx]: FAILED! => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "changed": false, "msg": "show system information\r\n                   ^\r\nError: Invalid parameter. \r\nA:VSR# "}

The reason for failure is that when the license is not activated, VSR does not support "show system information" command but nokia.sros plugin always wants to run that first.

A:VSR# show system information
                   ^
Error: Invalid parameter.

Would there be some way to enhance the implementation to support also this use case where I just want to run a simple command and nokia.sros could ignore trying to read the system information?

jurajama avatar Apr 09 '21 05:04 jurajama