cancel
Showing results for 
Search instead for 
Did you mean: 
Gineesh
Flight Engineer
Flight Engineer
  • 12.9K Views

Ansible Modules for HP Switches (Comware 7)

I was developing some latest playbooks for HP Switches (HP 5130 - CMW710) and noticed the 3rd party modules (refer link below) are not working any more with latest Ansible version (ansible 2.9.9). Also I found the repository is not maintained anymore (or last update was few years ago).

Could anyone advise if there are Ansible modules for HP switches ? (eg: HP 5130)

Or any other best practice to implement Ansible for HP Network Automation ?

Notes:

  • I have tried raw, cli_commands like modules to achieve the dirty way of executing commands, but failed with those.

  • Already enabled netconf on devices but still fail with ansible_connection=network_cli or ansible_connection=netconf

Thanks in advance.

Labels (4)
0 Kudos
9 Replies
hal2069
Cadet
Cadet
  • 12.1K Views

I am also interested in the topic :)

0 Kudos
  • 12K Views

we have already dropped that plan to use those and used direct "raw" commands instead

0 Kudos
MaximeA
Cadet
Cadet
  • 12K Views

I also think it's not maintained anymore. Getting errors while trying simple comware_ping & comware_facts command. I'm using Ansible 2.9.16.

0 Kudos
  • 12K Views

Yeah. 
we have already dropped that plan to use those and used direct "raw" commands instead

0 Kudos
Markolo95
Cadet
Cadet
  • 10.8K Views

Hy!

How did you achieve to use the "cli_command"? I mean what did you use at "ansible_network_os", and "connection"?

Thanks.

0 Kudos
Gineesh
Flight Engineer
Flight Engineer
  • 9,812 Views

my apologies as I have overlooked this question.

Hope you have already found a solution for the same.

Anyway, sharing from my side (as per my old records as it was done in middle of 2020) 

[labds:vars]
ansible_network_os=auto
ansible_connection=netconf
ansible_password=password
ansible_username=hpuser
ansible_user=hpuser
ansible_ssh_user=hpuser
0 Kudos
bad
Cadet
Cadet
  • 6,943 Views

Hello,

Have included these variables:

ansible_connection=netconf
ansible_network_os=auto
 
Although still giving me this error:
 
{
"module_stdout": "",
"module_stderr": "command timeout triggered, timeout value is 30 secs.\nSee the timeout setting options in the Network Debug and Troubleshooting Guide.",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"_ansible_no_log": false,
"changed": false
}
0 Kudos
Juan3
Mission Specialist
Mission Specialist
  • 6,912 Views

Is netconf enabled? 

The ansible_connection var is netconf then the switch needs to have it enabled and configured. 

 

It looks like the stderr message is a timeout which makes me wonder if netconf is enabled or not or something in the middle is not allowing it. 

 

 

http://www.h3c.com/en/Support/Resource_Center/EN/Home/Switches/00-Public/Configure___Deploy/Configur...

 

 

 

 

bad
Cadet
Cadet
  • 6,906 Views

@Juan3 my bad, I'm running this playbook on a HP A5500, which have a Comware 5.20.99:

---
- hosts: hp
  gather_facts: false
 
  tasks:
    - name: Bootstrap a host without python2 installed
      ansible.builtin.raw: display current-configuration
      register: config

 

0 Kudos
Join the discussion
You must log in to join this conversation.