Skip to content

Commit

Permalink
feat(bmc): add bmc_reboot_should_wait argument
Browse files Browse the repository at this point in the history
Signed-off-by: Boris Glimcher <[email protected]>
  • Loading branch information
glimchb committed Feb 22, 2024
1 parent 4b62f53 commit 701b465
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 4 deletions.
4 changes: 0 additions & 4 deletions roles/bmc_fw_update/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,6 @@
when:
- bmc_fw_update_reboot is true

- name: Pause for 60 seconds for BMC to Reboot
ansible.builtin.pause:
seconds: 60

- name: Get Firmware Inventory
ansible.builtin.include_role:
name: get_bmc_facts
Expand Down
5 changes: 5 additions & 0 deletions roles/bmc_reboot/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2022-2024 Dell Inc, or its subsidiaries.

---
# defaults file for bmc_reboot

bmc_reboot_should_wait: true
15 changes: 15 additions & 0 deletions roles/bmc_reboot/meta/argument_specs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2022-2024 Dell Inc, or its subsidiaries.
---
argument_specs:
main:
version_added: "1.0.0"
short_description: Role to restart DPU BMC
description:
- Role to restart DPU BMC.
options:
bmc_reboot_should_wait:
description:
- Wait for the BMC to restart.
type: bool
default: true
6 changes: 6 additions & 0 deletions roles/bmc_reboot/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,9 @@
username: "{{ dpu_bmc_username }}"
password: "{{ dpu_bmc_password }}"
delegate_to: localhost

- name: Pause for a bit to allow BMC to Reboot
ansible.builtin.pause:
seconds: "{{ bmc_reboot_delay }}"
when:
- bmc_reboot_should_wait is true
5 changes: 5 additions & 0 deletions roles/bmc_reboot/vars/main.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2022-2024 Dell Inc, or its subsidiaries.

---
# vars file for bmc_reboot

bmc_reboot_delay: 60

0 comments on commit 701b465

Please sign in to comment.