dellemc / dellemc.openmanage / 2.1.5 / module / ome_powerstate Performs the power management operations on OpenManage Enterprise. | "added in version" 2.9.10 of dellemc.openmanage" Authors: Felix Stephen (@felixs88) preview | supported by communitydellemc.openmanage.ome_powerstate (2.1.5) — module
Install with ansible-galaxy collection install dellemc.openmanage:==2.1.5
collections: - name: dellemc.openmanage version: 2.1.5
This module performs the supported power management operations on OpenManage Enterprise.
--- - name: Power state operation based on device id. dellemc.openmanage.ome_powerstate: hostname: "192.168.0.1" username: "username" password: "password" device_id: 11111 power_state: "off"
- name: Power state operation based on device service tag. dellemc.openmanage.ome_powerstate: hostname: "192.168.0.1" username: "username" password: "password" device_service_tag: "KLBR111" power_state: "on"
- name: Power state operation based on list of device ids. dellemc.openmanage.ome_powerstate: hostname: "192.168.0.1" username: "username" password: "password" device_id: "{{ item.device_id }}" power_state: "{{ item.state }}" with_items: - { "device_id": 11111, "state": "on" } - { "device_id": 22222, "state": "off" }
- name: Power state operation based on list of device service tags. dellemc.openmanage.ome_powerstate: hostname: "192.168.0.1" username: "username" password: "password" device_service_tag: "{{ item.service_tag }}" power_state: "{{ item.state }}" with_items: - { "service_tag": "KLBR111", "state": "on" } - { "service_tag": "KLBR222", "state": "off" }
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 device_id: description: - Targeted device id. - I(device_id) is mutually exclusive with I(device_service_tag). type: int power_state: choices: - 'on' - 'off' - coldboot - warmboot - shutdown description: Desired end power state. required: true type: str device_service_tag: description: - Targeted device service tag. - I(device_service_tag) is mutually exclusive with I(device_id). type: str
job_status: description: Power state operation job and progress details from the OME. returned: success sample: Builtin: false CreatedBy: user Editable: true EndTime: null Id: 11111 JobDescription: DeviceAction_Task JobName: DeviceAction_Task_PowerState JobStatus: Id: 1111 Name: New JobType: Id: 1 Internal: false Name: DeviceAction_Task LastRun: '2019-04-01 06:39:02.69' LastRunStatus: Id: 1112 Name: Running NextRun: null Params: - JobId: 11111 Key: powerState Value: '2' - JobId: 11111 Key: operationName Value: POWER_CONTROL Schedule: '' StartTime: null State: Enabled Targets: - Data: '' Id: 11112 JobId: 11111 TargetType: Id: 1000 Name: DEVICE UpdatedBy: null Visible: true type: dict msg: description: Overall power state operation job status. returned: always sample: Power State operation job submitted successfully. type: str