dell / dellemc-openmanage-ansible-modules

Dell OpenManage Ansible Modules
GNU General Public License v3.0
336 stars 163 forks source link

dellemc_get_system_inventory return data #123

Closed muffetman closed 3 years ago

muffetman commented 4 years ago

Hi,

On line 110 of dellemc_get_system_inventory.py we have: module.exit_json(ansible_facts={idrac.ipaddr: {'SystemInventory': msg['msg']}})

When retrieving the facts from this output it is necessary to extrapolate the iDRAC host's IP address due to the fact the data is put in the idrac.ipaddr dict. I am wondering why this is so and if it is necessary? For my playbooks I am using DNS names to reach the hosts and whilst I could retrieve the iDRAC IP address and use it to fetch the facts from this output, it seems like unnecessary extra code. By removing idrac.ipaddr this removes the need for having to provide this extra information to reach the data. Or perhaps there is a good reason why it is like this?

The same is true for dellemc_get_firmware_inventory

Cheers.

anupamaloke commented 4 years ago

@muffetman, you are absolutely right. There is no need to pur iDRAC host IP address in the output. @jagadeeshnv, @rajeevarakkal, comments?

muffetman commented 4 years ago

Hi, I can submit a PR if that helps?

anupamaloke commented 4 years ago

@muffetman, please submit a PR.

anupamaloke commented 3 years ago

@muffetman, closing this as this issue has been fixed in idrac_system_info. dellemc_get_system_inventory module has been deprecated in the v3.0.0 release of the dellemc.openmanage collection.