Closed dafoyiming closed 2 years ago
@dafoyiming, Server power cycle operations such as Graceful Restart do not create a iDRAC Task or a JOB.
One way, IMHO, could be to check the value of the ServerStatus
attribute in the output of the idrac_lifecycle_controller_status and make sure that it is not "In POST". Possible values for ServerStatus
are Powered Off
, In POST
, Out of POST
, Collecting System Inventory
, Automated Task Execution
, Lifecycle Controller Unified Server Configurator
, Server has halted at F1/F2 error prompt because of a POST error
, Server has halted at F1/F2/F11 prompt because there are no bootable devices available
, and Server has entered F2 setup menu, Server has entered F11 Boot Manager menu
.
Playbook:
- hosts: idrac
connection: local
gather_facts: no
tasks:
- name: get lc status
include_role:
name: idrac_lifecycle_controller_status
vars:
idrac_ip: "{{ inventory_hostname }}"
idrac_user: "{{ user }}"
idrac_password: "{{ password }}"
Output
<SNIPPED for brevity>
TASK [idrac_lifecycle_controller_status : parse lifecycle controller status response] ************************************************************************
task path: /home/anupam/virtualenv/redfish_ansible_module/redfish-ansible-module/roles/idrac_lifecycle_controller_status/tasks/main.yml:73
ok: [192.168.10.10] => {
"ansible_facts": {
"idrac_lc_status": {
"LCStatus": "Ready",
"RTStatus": "Ready",
"ServerStatus": "HaltedF1/F2/F11Prompt",
"Status": "Ready"
}
},
"changed": false
}
thank you. anupamaloke
That's suggestion is very helpful.
Hi Team
I am wondering a sample for tracing the job such as graceful restart. Scheduled/Running/Completed.
Thanks