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 Mar 18, 2024
1 parent 0c46bdb commit ddf0475
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 5 deletions.
2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ tags: [opi, dpu, redfish, automation, devops, infrastructure]
# L(specifiers,https://python-semanticversion.readthedocs.io/en/latest/#requirement-specification). Multiple version
# range specifiers can be set and are separated by ','
dependencies: {
"community.general": ">=8.4.0",
"community.general": ">=8.5.0",
}

# The URL of the originating SCM repository
Expand Down
6 changes: 6 additions & 0 deletions roles/bmc_reboot/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
# 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
bmc_reboot_wait_timeout: 60
20 changes: 20 additions & 0 deletions roles/bmc_reboot/meta/argument_specs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# 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
bmc_reboot_wait_timeout:
description:
- Seconds to wait for the BMC to restart.
type: int
default: 60
6 changes: 2 additions & 4 deletions roles/bmc_reboot/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
baseuri: "{{ inventory_hostname }}"
username: "{{ dpu_bmc_username }}"
password: "{{ dpu_bmc_password }}"
wait: "{{ bmc_reboot_should_wait }}"
wait_timeout: "{{ bmc_reboot_wait_timeout }}"
delegate_to: localhost

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

0 comments on commit ddf0475

Please sign in to comment.