From 39a53c87a7f64f6271cf87dd88ba9c5e57a24bc5 Mon Sep 17 00:00:00 2001 From: Greg Dumas Date: Thu, 12 Dec 2024 16:53:08 -0500 Subject: [PATCH] Add error handling for ansible-galaxy install --- bin/install.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/install.sh b/bin/install.sh index a34f1fb..361dc55 100755 --- a/bin/install.sh +++ b/bin/install.sh @@ -90,7 +90,12 @@ done # install AWS collection for ansible -ansible-galaxy collection install amazon.aws +ansible_collections=(amazon.aws) +for collection in "${ansible_collections[@]}"; do + ansible-galaxy collection install "$collection" || { + exit 1 + } +done echo "Before you can run Zathras:"