mirror of
https://github.com/aminnairi/dotfiles.git
synced 2026-09-14 11:02:13 +02:00
now allowing the user to choose the playbook path only if no arguments
has been provided
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user