Skip to content

Commit e6d5927

Browse files
authored
Add some more delay for DELL boot-iso redfish tasks (#744)
Also add some more information about the host being configured in the task name - it really helps finding issues when it fails.
1 parent ea8ec61 commit e6d5927

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

ansible/roles/boot-iso/tasks/dell.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
set_fact:
66
_virtual_media_iso: "{{ virtual_media_iso | default(hostvars[item]['boot_iso']) }}"
77

8-
- name: Dell - Power down machine prior to booting iso
8+
- name: "Dell - Power down machine prior to booting iso for {{ item }}"
99
shell: |
1010
ipmitool -I lanplus -H {{ hostvars[item]['bmc_address'] }} -U {{ hostvars[item]['bmc_user'] }} -P {{ hostvars[item]['bmc_password'] }} chassis power off
1111
ignore_errors: true
1212
register: ipmi_poweroff
1313

14-
- name: Dell - Pause for power down
14+
- name: "Dell - Pause for power down for {{ item }}"
1515
pause:
1616
seconds: 10
1717
when: not ipmi_poweroff.failed
@@ -35,7 +35,7 @@
3535
status_code: 202
3636
return_content: yes
3737

38-
- name: Dell - Check for Virtual Media
38+
- name: "Dell - Check for Virtual Media for {{ item }}"
3939
uri:
4040
url: "https://{{ hostvars[item]['bmc_address'] }}/redfish/v1/Managers/iDRAC.Embedded.1/VirtualMedia/CD"
4141
user: "{{ hostvars[item]['bmc_user'] }}"
@@ -54,7 +54,7 @@
5454
- name: Block to rescue incase of stuck virtual media
5555
when: check_virtual_media.json.Image
5656
block:
57-
- name: Dell - Eject any CD Virtual Media
57+
- name: "Dell - Eject any CD Virtual Media for {{ item }}"
5858
uri:
5959
url: "https://{{ hostvars[item]['bmc_address'] }}/redfish/v1/Managers/iDRAC.Embedded.1/VirtualMedia/CD/Actions/VirtualMedia.EjectMedia"
6060
user: "{{ hostvars[item]['bmc_user'] }}"
@@ -71,23 +71,23 @@
7171

7272
rescue:
7373
# Use racadm to address the failed redfish unmount of old virtual media
74-
- name: Force mount of a existing image
74+
- name: "Force mount of a existing image for {{ item }}"
7575
raw: racadm remoteimage -c -u "" -p "" -l http://{{ http_store_host }}:{{ http_store_port }}/{{ _virtual_media_iso }}
7676
delegate_to: "{{ hostvars[item]['bmc_address'] }}"
7777
vars:
7878
ansible_user: "{{ hostvars[item]['bmc_user'] }}"
7979
ansible_password: "{{ hostvars[item]['bmc_password'] }}"
8080
ansible_ssh_common_args: '-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null'
8181

82-
- name: Force unmount of the existing image
82+
- name: "Force unmount of the existing image for {{ item }}"
8383
raw: racadm remoteimage -d
8484
delegate_to: "{{ hostvars[item]['bmc_address'] }}"
8585
vars:
8686
ansible_user: "{{ hostvars[item]['bmc_user'] }}"
8787
ansible_password: "{{ hostvars[item]['bmc_password'] }}"
8888
ansible_ssh_common_args: '-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null'
8989

90-
- name: DELL - Insert Virtual Media
90+
- name: "DELL - Insert Virtual Media for {{ item }}"
9191
community.general.redfish_command:
9292
category: Manager
9393
command: VirtualMediaInsert
@@ -100,19 +100,21 @@
100100
- CD
101101
- DVD
102102
resource_id: iDRAC.Embedded.1
103+
timeout: 60
103104
register: result
104105
until: not result.failed
105-
retries: 5
106+
retries: 10
106107
delay: 30
107108

108-
- name: DELL - Power ON
109+
- name: "DELL - Power ON for {{ item }}"
109110
community.general.redfish_command:
110111
category: Systems
111112
command: PowerOn
112113
baseuri: "{{ hostvars[item]['bmc_address'] }}"
113114
username: "{{ hostvars[item]['bmc_user'] }}"
114115
password: "{{ hostvars[item]['bmc_password'] }}"
116+
timeout: 60
115117
register: result
116118
until: not result.failed
117-
retries: 5
119+
retries: 10
118120
delay: 30

0 commit comments

Comments
 (0)