cancel
Showing results for 
Search instead for 
Did you mean: 

Ansible ICX module doesnt work

support_team_3z
New Contributor II
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 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.

root@LTMIKE050:/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


3 REPLIES 3