Note
This plugin is part of the community.general collection.
To install it use: ansible-galaxy collection install community.general.
To use it in a playbook, specify: community.general.ome_device_info.
The below requirements are needed on the host that executes this module.
| Parameter | Choices/Defaults | Comments | |
|---|---|---|---|
| fact_subset string |
| basic_inventory returns the list of the devices.detailed_inventory returns the inventory details of specified devices.subsystem_health returns the health status of specified devices. | |
| hostname string / required | Target IP Address or hostname. | ||
| password string / required | Target user password. | ||
| port integer | Default: 443 | Target HTTPS port. | |
| system_query_options dictionary |
system_query_options applicable for the choices of the fact_subset. Either device_id or device_service_tag is mandatory for detailed_inventory and subsystem_health or both can be applicable. | ||
| device_id list / elements=string | A list of unique identifier is applicable for detailed_inventory and subsystem_health. | ||
| device_service_tag list / elements=string | A list of service tags are applicable for detailed_inventory and subsystem_health. | ||
| filter string | For basic_inventory, it filters the collection of devices. filter query format should be aligned with OData standards. | ||
| inventory_type string | For detailed_inventory, it returns details of the specified inventory type. | ||
| username string / required | Target username. | ||
---
- name: Retrieve basic inventory of all devices.
community.general.ome_device_info:
hostname: "192.168.0.1"
username: "username"
password: "password"
- name: Retrieve basic inventory for devices identified by IDs 33333 or 11111 using filtering.
community.general.ome_device_info:
hostname: "192.168.0.1"
username: "username"
password: "password"
fact_subset: "basic_inventory"
system_query_options:
filter: "Id eq 33333 or Id eq 11111"
- name: Retrieve inventory details of specified devices identified by IDs 11111 and 22222.
community.general.ome_device_info:
hostname: "192.168.0.1"
username: "username"
password: "password"
fact_subset: "detailed_inventory"
system_query_options:
device_id:
- 11111
- 22222
- name: Retrieve inventory details of specified devices identified by service tags MXL1234 and MXL4567.
community.general.ome_device_info:
hostname: "192.168.0.1"
username: "username"
password: "password"
fact_subset: "detailed_inventory"
system_query_options:
device_service_tag:
- MXL1234
- MXL4567
- name: Retrieve details of specified inventory type of specified devices identified by ID and service tags.
community.general.ome_device_info:
hostname: "192.168.0.1"
username: "username"
password: "password"
fact_subset: "detailed_inventory"
system_query_options:
device_id:
- 11111
device_service_tag:
- MXL1234
- MXL4567
inventory_type: "serverDeviceCards"
- name: Retrieve subsystem health of specified devices identified by service tags.
community.general.ome_device_info:
hostname: "192.168.0.1"
username: "username"
password: "password"
fact_subset: "subsystem_health"
system_query_options:
device_service_tag:
- MXL1234
- MXL4567
Common return values are documented here, the following are the fields unique to this module:
| Key | Returned | Description |
|---|---|---|
| device_info dictionary | success | Returns the information collected from the Device. Sample: {'value': [{'Actions': None, 'AssetTag': None, 'ChassisServiceTag': None, 'ConnectionState': True, 'DeviceManagement': [{'DnsName': 'dnsname.host.com', 'InstrumentationName': 'MX-12345', 'MacAddress': '11:10:11:10:11:10', 'ManagementId': 12345, 'ManagementProfile': [{'HasCreds': 0, 'ManagementId': 12345, 'ManagementProfileId': 12345, 'ManagementURL': 'https://192.168.0.1:443', 'Status': 1000, 'StatusDateTime': '2019-01-21 06:30:08.501'}], 'ManagementType': 2, 'NetworkAddress': '192.168.0.1'}], 'DeviceName': 'MX-0003I', 'DeviceServiceTag': 'MXL1234', 'DeviceSubscription': None, 'LastInventoryTime': '2019-01-21 06:30:08.501', 'LastStatusTime': '2019-01-21 06:30:02.492', 'ManagedState': 3000, 'Model': 'PowerEdge MX7000', 'PowerState': 17, 'SlotConfiguration': {}, 'Status': 4000, 'SystemId': 2031, 'Type': 2000}]} |
| msg string | on error | Over all device information status. Sample: Failed to fetch the device information |
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.10/collections/community/general/ome_device_info_module.html