ansible-collections / community.general

Ansible Community General Collection
https://galaxy.ansible.com/ui/repo/published/community/general/
GNU General Public License v3.0
820 stars 1.5k forks source link

Obtain redfish information on storage controllers for HPe servers #7080

Closed pyfontan closed 1 year ago

pyfontan commented 1 year ago

Summary

I want to get storage controllers properties from redfish. I have no problem with DELL servers, but can't get properties on HPe servers.

Issue Type

Bug Report

Component Name

redfish_info redfish_utils

Ansible Version

$ ansible --version
ansible [core 2.14.5]
  config file = /home/pyfontan/.ansible.cfg
  configured module search path = ['/home/pyfontan/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/pyfontan/virtualenv/ansible/lib/python3.10/site-packages/ansible
  ansible collection location = /home/pyfontan/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/pyfontan/virtualenv/ansible/bin/ansible
  python version = 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0] (/home/pyfontan/virtualenv/ansible/bin/python3)
  jinja version = 3.1.2
  libyaml = True

Community.general Version

$ ansible-galaxy collection list community.general
# /home/pyfontan/.ansible/collections/ansible_collections
Collection        Version
----------------- -------
community.general 7.3.0 

Configuration

$ ansible-config dump --only-changed
CONFIG_FILE() = /home/pyfontan/.ansible.cfg
HOST_KEY_CHECKING(/home/pyfontan/.ansible.cfg) = False
RETRY_FILES_ENABLED(/home/pyfontan/.ansible.cfg) = True

OS / Environment

No response

Steps to Reproduce

---
  - hosts: localhost
    connection: local
    gather_facts: false

    tasks:
      - name: Get Storage Controllers Inventory
        community.general.redfish_info:
          category: Systems
          command: GetStorageControllerInventory
          baseuri: "{{manager_ip}}"
          username: "{{manager_user}}"
          password: "{{manager_password}}"
        register: controllers_inventory

      - ansible.builtin.debug:
          var: controllers_inventory

Expected Results

I expect to have the storage controller properties for HPe servers

Actual Results

On DELL:

TASK [ansible.builtin.debug] ***********************************************************************************************************************************
ok: [localhost] => {                                                                                                                                            
    "controllers_inventory": {
        "ansible_facts": {
            "discovered_interpreter_python": "/usr/bin/python3"
        },                         
        "changed": false,                                                                                                                                       
        "failed": false,                                                                                                                                        
        "redfish_facts": {                                                                                                                                      
            "storage_controller": {                                                                                                                             
                "entries": [                                                    
                    [                                                           
                        {                                                                                                                                       
                            "system_uri": "/redfish/v1/Systems/System.Embedded.1"                                                                               
                        },                                                                                                                                      
                        [                                                                                                                                       
                            {                                                                                                                                   
                                "FirmwareVersion": "21.3.0-0009",                                                                                               
                                "Identifiers": [                                                                                                                
                                    {                                                                                                                           
                                        "DurableName": "5B083FE0DB915200",                                                                                      
                                        "DurableNameFormat": "NAA"                                                                                              
                                    }                                           
                                ],                                              
                                "Manufacturer": "DELL",                         
                                "Model": "PERC H710P Mini",                     
                                "Name": "PERC H710P Mini",                      
                                "SpeedGbps": 6,                                                                                                                 
                                "Status": {                                                                                                                     
                                    "Health": "OK",                                                                                                             
                                    "HealthRollup": "OK",
                                    "State": "Enabled"                          
                                }
                            }
                        ]
                    ]
                ],
                "ret": true
            }
        }
    }
}

On HPe:

TASK [ansible.builtin.debug] ***********************************************************************************************************************************
ok: [localhost] => {
    "controllers_inventory": {
        "ansible_facts": {
            "discovered_interpreter_python": "/usr/bin/python3"
        },
        "changed": false,
        "failed": false,
        "redfish_facts": {
            "storage_controller": {
                "entries": [
                    [
                        {
                            "system_uri": "/redfish/v1/Systems/1/"
                        },
                        []
                    ]
                ],
                "ret": true
            }
        }
    }
}

Code of Conduct

ansibullbot commented 1 year ago

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

ansibullbot commented 1 year ago

cc @TSKushal @bhavya06 @jyundt @mraineri @rajeevkallur @renxulei @tomasg2012 @xmadsen click here for bot help

ansibullbot commented 1 year ago

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help