diff --git a/roles/bmc_fw_update/tasks/main.yml b/roles/bmc_fw_update/tasks/main.yml index f7aba8e..6a41750 100644 --- a/roles/bmc_fw_update/tasks/main.yml +++ b/roles/bmc_fw_update/tasks/main.yml @@ -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 diff --git a/roles/bmc_reboot/defaults/main.yml b/roles/bmc_reboot/defaults/main.yml index 9d51a65..3c36ba3 100644 --- a/roles/bmc_reboot/defaults/main.yml +++ b/roles/bmc_reboot/defaults/main.yml @@ -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 diff --git a/roles/bmc_reboot/meta/argument_specs.yml b/roles/bmc_reboot/meta/argument_specs.yml new file mode 100644 index 0000000..666245a --- /dev/null +++ b/roles/bmc_reboot/meta/argument_specs.yml @@ -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 diff --git a/roles/bmc_reboot/tasks/main.yml b/roles/bmc_reboot/tasks/main.yml index ec312c1..a189d1d 100644 --- a/roles/bmc_reboot/tasks/main.yml +++ b/roles/bmc_reboot/tasks/main.yml @@ -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: "{{ dpu_bmc_reset_delay }}" + when: + - bmc_reboot_should_wait is true diff --git a/roles/bmc_reboot/vars/main.yml b/roles/bmc_reboot/vars/main.yml index 9a5a7e4..b8ce88f 100644 --- a/roles/bmc_reboot/vars/main.yml +++ b/roles/bmc_reboot/vars/main.yml @@ -1,2 +1,7 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2022-2024 Dell Inc, or its subsidiaries. + --- # vars file for bmc_reboot + +dpu_bmc_reset_delay: 60