mirror of
https://github.com/aminnairi/dotfiles.git
synced 2026-11-13 15:19:09 +01:00
now allowing the user to choose the playbook path only if no arguments
has been provided
This commit is contained in:
1 parent
c8f937b90d
commit
9bff80c0f9
1 file changed
+5
@@ -28,6 +28,10 @@ then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
choosen_playbook_path=$1
|
||||||
|
|
||||||
|
if [[ -z $choosen_playbook_path ]]
|
||||||
|
then
|
||||||
echo "Choose a configuration";
|
echo "Choose a configuration";
|
||||||
|
|
||||||
available_playbooks="$(ls ansible/*.yml)"
|
available_playbooks="$(ls ansible/*.yml)"
|
||||||
@@ -48,6 +52,7 @@ done
|
|||||||
read -r -p "Choice: " index
|
read -r -p "Choice: " index
|
||||||
|
|
||||||
choosen_playbook_path=${available_playbook_paths[$index - 1]}
|
choosen_playbook_path=${available_playbook_paths[$index - 1]}
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ -z $choosen_playbook_path ]]
|
if [[ -z $choosen_playbook_path ]]
|
||||||
then
|
then
|
||||||
|
|||||||
Reference in new issue
Block a user