Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crucible | Update possible responses received from KVM Force Power On System #115

Merged
merged 7 commits into from
Jan 5, 2024
49 changes: 25 additions & 24 deletions roles/vendors/kvm/tasks/iso.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
password: "{{ bmc_password }}"
method: GET
status_code: [200, 201]
validate_certs: no
return_content: yes
validate_certs: false
return_content: true
register: http_reply

- debug: # noqa unnamed-task
Expand All @@ -37,9 +37,9 @@
body_format: json
body: { "ResetType": "ForceOff" }
status_code: [200, 204]
force_basic_auth: no
validate_certs: no
return_content: yes
force_basic_auth: false
validate_certs: false
return_content: true
register: redfish_poweroff
ignore_errors: yes

Expand All @@ -52,8 +52,8 @@
body_format: json
body: {}
status_code: [200, 204]
validate_certs: no
return_content: yes
validate_certs: false
return_content: true
register: redfish_reply
ignore_errors: yes

Expand All @@ -70,9 +70,9 @@
body_format: json
body: { "Image": "{{ boot_iso_url }}", "Inserted": true }
status_code: [200, 204]
force_basic_auth: no
validate_certs: no
return_content: yes
force_basic_auth: false
validate_certs: false
return_content: true
timeout: 120
register: redfish_reply
until: "redfish_reply.status == 204"
Expand All @@ -90,8 +90,8 @@
password: "{{ bmc_password }}"
method: GET
status_code: [200, 201]
validate_certs: no
return_content: yes
validate_certs: false
return_content: true
register: redfish_reply
when: ansible_verbosity >= 1

Expand All @@ -116,9 +116,9 @@
},
}
status_code: [200, 204]
force_basic_auth: no
validate_certs: no
return_content: yes
force_basic_auth: false
validate_certs: false
return_content: true
register: redfish_reply

- debug: # noqa unnamed-task
Expand All @@ -132,8 +132,8 @@
password: "{{ bmc_password }}"
method: GET
status_code: [200, 201]
validate_certs: no
return_content: yes
validate_certs: false
return_content: true
register: redfish_reply

- debug: # noqa unnamed-task
Expand All @@ -149,9 +149,9 @@
body_format: json
body: { "ResetType": "ForceRestart" }
status_code: [200, 204]
force_basic_auth: no
validate_certs: no
return_content: yes
force_basic_auth: false
validate_certs: false
return_content: true
register: redfish_restart
when: redfish_reply.json.PowerState == "On"

Expand All @@ -163,9 +163,10 @@
method: POST
body_format: json
body: { "ResetType": "ForceOn" }
status_code: [200, 204]
force_basic_auth: no
validate_certs: no
return_content: yes
# redfish specification: https://www.dmtf.org/sites/default/files/standards/documents/DSP0266_1.19.0.pdf
status_code: [200, 201, 202, 204]
force_basic_auth: false
validate_certs: false
return_content: true
register: redfish_poweron
when: redfish_reply.json.PowerState == "Off"