ansible / ansible.builtin / v2.9.27 / module / ome_device_info Retrieves the information about Device. | "added in version" 2.9 of ansible.builtin" Authors: Sajna Shetty(@Sajna-Shetty) preview | supported by communityansible.builtin.ome_device_info (v2.9.27) — module
pip
Install with pip install ansible==2.9.27
This module retrieves the list of all devices information with the exhaustive inventory of each device.
--- - name: Retrieve basic inventory of all devices. 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. 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. 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. 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. 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. ome_device_info: hostname: "192.168.0.1" username: "username" password: "password" fact_subset: "subsystem_health" system_query_options: device_service_tag: - MXL1234 - MXL4567
port: default: 443 description: - Target HTTPS port. type: int hostname: description: - Target IP Address or hostname. required: true type: str password: description: - Target user password. required: true type: str username: description: - Target 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 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). type: list device_service_tag: description: - A list of service tags are applicable for C(detailed_inventory) and C(subsystem_health). 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