From d22f22b6ce574489291fbb7f18540b4df256fa36 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 1 Jan 2026 08:27:04 +0000 Subject: [PATCH] Fix unbound variable error when ANSIBLE_ARGS is empty --- bin/bootstrap | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/bin/bootstrap b/bin/bootstrap index 6552b81..aaec9b0 100755 --- a/bin/bootstrap +++ b/bin/bootstrap @@ -60,12 +60,20 @@ done # Run the Ansible playbook with setup tags # Add --ask-become-pass to prompt for sudo password when needed (Linux apt tasks) # shellcheck disable=SC2086 -uvx --from ansible-core ansible-playbook \ - "$PLAYBOOK" \ - --tags setup \ - --ask-become-pass \ - $EXTRA_VARS \ - "${ANSIBLE_ARGS[@]}" +if [[ ${#ANSIBLE_ARGS[@]} -gt 0 ]]; then + uvx --from ansible-core ansible-playbook \ + "$PLAYBOOK" \ + --tags setup \ + --ask-become-pass \ + $EXTRA_VARS \ + "${ANSIBLE_ARGS[@]}" +else + uvx --from ansible-core ansible-playbook \ + "$PLAYBOOK" \ + --tags setup \ + --ask-become-pass \ + $EXTRA_VARS +fi echo "" echo "========================================"