HewlettPackard / oneview-ansible-collection

Ansible Collection and Sample Playbooks for HPE OneView
Apache License 2.0
24 stars 22 forks source link

server_hardware_facts - all server_firwmare issue #286

Closed pawelfi closed 6 months ago

pawelfi commented 6 months ago

Hello,

I used this kind of playbook:

- name: Gather all facts about a Server Hardware
  oneview_server_hardware_facts:
    hostname: IP_address
    username: administrator
    password: my_password
    api_version: 3200
    options:
      - firmwares               # optional
  delegate_to: localhost

- debug: var=server_hardware_firmwares

But his gives me back: "server_hardware_firmwares": VARIABLE IS NOT DEFINIED"

/oneview-ansible-collection/tree/master/plugins/modules/oneview_server_hardware_facts.py has under line 221 this:


server_hardware_firmwares:
    description: Has all the facts about the firmwares inventory **across all servers.**
    returned: When requested, but can be null.
    type: dict

So I understand that i do not have to use "name:" - to gather information "across all servers."?

Could you please let me know how to gather information abut server firmware across all servers located on composer?

I can do it using loop, or a variable that holds all server names, but from example written looks that this kind of information should be gathered with simple playbook as i wrote.

Regards Pawel

akshith-gunasheelan commented 6 months ago

Hello @pawelfi, thanks for pointing out the issue, we will look into it and get back to you.

akshith-gunasheelan commented 6 months ago

Hello @pawelfi, we were not able to reproduce the issue, we are seeing that the code you have used is working for fetching the information about server firmware across all servers on composer. Could you try updating to the latest versions of ansible SDK and install latest version of hpeOneview and see if your issue is being resolved.

pawelfi commented 6 months ago

Hello Unfortunately im not able because of environment specification update the ansible SDK, I just could update OneView Ansible to latest one 8.7. But the problem is gone.

Using that same playbook Im able now to get all data firmware from across all servers. Thank you for support. The previous version i was using was 8.6.

akshith-gunasheelan commented 6 months ago

Thank you, I will be closing the issue as its resolved.