now allowing the user to choose the playbook path only if no arguments

has been provided
This commit is contained in:
aminnairi
2024-01-04 12:24:28 +01:00
parent c8f937b90d
commit 9bff80c0f9
+5
View File
@@ -28,6 +28,10 @@ then
fi
fi
choosen_playbook_path=$1
if [[ -z $choosen_playbook_path ]]
then
echo "Choose a configuration";
available_playbooks="$(ls ansible/*.yml)"
@@ -48,6 +52,7 @@ done
read -r -p "Choice: " index
choosen_playbook_path=${available_playbook_paths[$index - 1]}
fi
if [[ -z $choosen_playbook_path ]]
then