1

I've to perform some network automation in my infra using ansible.

When I'm trying to use ansible module for icx switches it seems to be misbehaving.

Playbook I used

---
- name: ICX switch testing
  hosts: test-switch
  gather_facts: no
  vars:
    ansible_user: username
    ansible_password: password
    ansible_connection: ansible.netcommon.network_cli
    ansible_network_os: icx
  tasks:
    - name: show version
      icx_command:
        commands:
          - show version

for this I'm getting below error

FAILED! => {"changed": false, "msg": "skip\r\nInvalid input -> skip\r\nType ? for a list\r\nSSH@ICX7250-24P Switch>"}

when I use enable mode using ansible_become then it gives below error

FAILED! => {"changed": false, "msg": "unable to elevate privilege to enable mode, at prompt [None] with error: timeout value 60 seconds reached while trying to send command: b'enable'"}

I'm not sure why command enable changed to b'enable. Seems some issue with module

ansible version

ansible 2.9.9
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.6/site-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 3.6.8 (default, Sep 26 2019, 11:57:09) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
saurabh
  • 21
  • 3

0 Answers0