dellemc / dellemc.openmanage / 9.1.0 / module / ome_device_info Retrieves the information of devices inventoried by OpenManage Enterprise | "added in version" 2.0.0 of dellemc.openmanage" Authors: Sajna Shetty (@Sajna-Shetty), Felix Stephen (@felixs88)dellemc.openmanage.ome_device_info (9.1.0) — module
Install with ansible-galaxy collection install dellemc.openmanage:==9.1.0
collections: - name: dellemc.openmanage version: 9.1.0
This module retrieves the list of devices in the inventory of OpenManage Enterprise along with the details of each device.
--- - name: Retrieve basic inventory of all devices dellemc.openmanage.ome_device_info: hostname: "192.168.0.1" username: "username" password: "password" ca_path: "/path/to/ca_cert.pem"
- name: Retrieve basic inventory for devices identified by IDs 33333 or 11111 using filtering dellemc.openmanage.ome_device_info: hostname: "192.168.0.1" username: "username" password: "password" ca_path: "/path/to/ca_cert.pem" 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 dellemc.openmanage.ome_device_info: hostname: "192.168.0.1" username: "username" password: "password" ca_path: "/path/to/ca_cert.pem" 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 dellemc.openmanage.ome_device_info: hostname: "192.168.0.1" username: "username" password: "password" ca_path: "/path/to/ca_cert.pem" 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 dellemc.openmanage.ome_device_info: hostname: "192.168.0.1" username: "username" password: "password" ca_path: "/path/to/ca_cert.pem" 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 dellemc.openmanage.ome_device_info: hostname: "192.168.0.1" username: "username" password: "password" ca_path: "/path/to/ca_cert.pem" fact_subset: "subsystem_health" system_query_options: device_service_tag: - MXL1234 - MXL4567
port: default: 443 description: OpenManage Enterprise or OpenManage Enterprise Modular HTTPS port. type: int ca_path: description: - The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. type: path version_added: 5.0.0 version_added_collection: dellemc.openmanage timeout: default: 30 description: The socket level timeout in seconds. type: int version_added: 5.0.0 version_added_collection: dellemc.openmanage hostname: description: OpenManage Enterprise or OpenManage Enterprise Modular IP address or hostname. required: true type: str password: description: - OpenManage Enterprise or OpenManage Enterprise Modular password. - If the password is not provided, then the environment variable C(OME_PASSWORD) is used. - 'Example: export OME_PASSWORD=password' required: true type: str username: description: - OpenManage Enterprise or OpenManage Enterprise Modular username. - If the username is not provided, then the environment variable C(OME_USERNAME) is used. - 'Example: export OME_USERNAME=username' required: true type: str fact_subset: choices: - basic_inventory - detailed_inventory - subsystem_health default: basic_inventory description: - C(basic_inventory) returns the list of the devices. - C(detailed_inventory) returns the inventory details of specified devices. - C(subsystem_health) returns the health status of specified devices. type: str validate_certs: default: true description: - If C(false), the SSL certificates will not be validated. - Configure C(false) only on personally controlled sites where self-signed certificates are used. - Prior to collection version C(5.0.0), the I(validate_certs) is C(false) by default. type: bool version_added: 5.0.0 version_added_collection: dellemc.openmanage system_query_options: description: - I(system_query_options) applicable for the choices of the fact_subset. Either I(device_id) or I(device_service_tag) is mandatory for C(detailed_inventory) and C(subsystem_health) or both can be applicable. suboptions: device_id: description: - A list of unique identifier is applicable for C(detailed_inventory) and C(subsystem_health). elements: int type: list device_service_tag: description: - A list of service tags are applicable for C(detailed_inventory) and C(subsystem_health). elements: str type: list filter: description: - For C(basic_inventory), it filters the collection of devices. I(filter) query format should be aligned with OData standards. type: str inventory_type: description: - For C(detailed_inventory), it returns details of the specified inventory type. type: str type: dict
device_info: description: Returns the information collected from the Device. returned: success sample: value: - Actions: null AssetTag: null ChassisServiceTag: null 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: null 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 type: dict msg: description: Over all device information status. returned: on error sample: Failed to fetch the device information type: str