Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.

Commit

Permalink
Added wait for firmware config.
Browse files Browse the repository at this point in the history
  • Loading branch information
rmkraus committed Aug 10, 2020
1 parent a6abace commit 693a44d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/playbooks/install-plan.d/cluster/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ STEPS="apply router
create machines
apply host-records
wait-for management-interfaces
wait-for firmware-config
create load-balancer
create install-repos
create cluster"
Expand Down
24 changes: 24 additions & 0 deletions app/playbooks/wait-for.d/firmware-config/main.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
echo -e "\e[93m"
cat <<EOM
Wait for cluster firmware configuration.
Please ensure the all cluster nodes have properly configured firmware.
See the documentation for details:
https://faros.dev/configuration.html#hardware-configuration
EOM
echo -e "\e[0m"

for node in $(ansible-inventory --graph control_plane); do
clean=$(echo "${node}" | grep -oP '[[:alpha:]].*')
mgmt=$(ansible-inventory --host "${clean}" 2>/dev/null | jq -r '.mgmt_hostname' 2>/dev/null)
if [ $? -eq 0 ]; then
echo -e "$node\tManagement IP: $mgmt"
else
echo $node
fi
done

echo -e "\nPress Enter to continue of Ctrl+C to cancel."
read

0 comments on commit 693a44d

Please sign in to comment.