dellemc / dellemc.openmanage / 9.1.0 / module / ome_powerstate Performs the power management operations on OpenManage Enterprise | "added in version" 2.1.0 of dellemc.openmanage" Authors: Felix Stephen (@felixs88)dellemc.openmanage.ome_powerstate (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 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" ca_path: "/path/to/ca_cert.pem" 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" ca_path: "/path/to/ca_cert.pem" 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" ca_path: "/path/to/ca_cert.pem" 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" ca_path: "/path/to/ca_cert.pem" 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: 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 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 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 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