Ansible ICX module doesnt work

  • 1
  • Question
  • Updated 3 weeks ago
  • Answered
  • (Edited)
Hello,

Want to somehow make icx module work from ansible, but running into a problem.
I have a simple playbook just for testing (show ver) but it gives me an error:

---
- name: show ver
  hosts: all
  gather_facts: no
  connection: local
  vars:
    ansible_network_os: icx
    ansible_user: user
    ansible_become: True
    ansible_password: pass      
    ansible_become_method: enable
    ansible_become_pass: pass      
    ansible_command_timeout: 80
  tasks:
    - name: show ver
      icx_command:
        commands:
          - show ver
      register: print_run

    - debug: var=print_run.stdout_lines


the error I'm running to:
[WARNING]: Platform linux on host <IP> is using the discovered Python interpreter at /usr/bin/python, but future installation of another
Python interpreter could change this. See https://docs.ansible.com/ansible/2.9/reference_appendices/interpreter_discovery.html for more information.


looks like Ansible wants to run python inside the icx switch (?! why), but python is already there or something like that.

Why is it the case? I just want to run commands over ssh.

[email protected]:/etc/ansible/test-playbook# ansible --version
ansible 2.9.6
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/root/.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.16 (default, Oct 10 2019, 22:02:15) [GCC 8.3.0]


I  tried it with different software on icx 7150.

Thank you.
Nika


Photo of Support team

Support team

  • 1 Post
  • 0 Reply Likes

Posted 2 months ago

  • 1
Photo of Michael Brado

Michael Brado, Official Rep

  • 3254 Posts
  • 503 Reply Likes
I would suggest to open a ticket for best advice...
Photo of Soliehm Jeevan

Soliehm Jeevan

  • 1 Post
  • 1 Reply Like
change your connection to network_cli

Photo of Nika Benashvili

Nika Benashvili

  • 1 Post
  • 0 Reply Likes
thanks, eventually I found out this was the case :)