setup.sh, improve output.

This commit is contained in:
2026-08-11 14:39:50 -07:00
parent cf5439cf73
commit 355d8c819a
+6 -5
View File
@@ -130,7 +130,7 @@ if [[ `which ansible > /dev/null; echo $?` != 0 ]]; then
exit 1 exit 1
fi fi
fi fi
echo "Installed!" echo "- Installed!"
if [[ -n $HOSTS_DIR && -n $HOSTS_FILE ]]; then if [[ -n $HOSTS_DIR && -n $HOSTS_FILE ]]; then
echo "Ensuring hosts file exists..." echo "Ensuring hosts file exists..."
@@ -139,7 +139,7 @@ if [[ -n $HOSTS_DIR && -n $HOSTS_FILE ]]; then
sudo sh -c "echo 'localhost ansible_connection=local' > $HOSTS_FILE" sudo sh -c "echo 'localhost ansible_connection=local' > $HOSTS_FILE"
fi fi
echo "$HOSTS_FILE: '`cat $HOSTS_FILE`'" echo "$HOSTS_FILE: '`cat $HOSTS_FILE`'"
echo "Hosts file created successfully!" echo "- Hosts file created successfully!"
fi fi
if [[ "$show_facts" == "Y" ]]; then if [[ "$show_facts" == "Y" ]]; then
@@ -150,7 +150,7 @@ fi
#echo "Adding Ansible Collections..." #echo "Adding Ansible Collections..."
#ansible-galaxy collection install community.general #ansible-galaxy collection install community.general
#echo "Added!" #echo "- Added!"
# Create basic layouts if configs do not exist and are requested. # Create basic layouts if configs do not exist and are requested.
@@ -215,6 +215,7 @@ if [[ "$ansible_exists" == 0 ]]; then
echo "Playbook is already being executed. Exiting." echo "Playbook is already being executed. Exiting."
exit 0 exit 0
fi fi
echo "- Verified!"
echo "Provisioning Ansible..." echo "Provisioning Ansible..."
if [[ $local == "Y" ]]; then if [[ $local == "Y" ]]; then
@@ -222,11 +223,11 @@ if [[ $local == "Y" ]]; then
else else
sudo ansible-pull -U $URL.git --checkout $branch sudo ansible-pull -U $URL.git --checkout $branch
fi fi
echo "Provisioned!" echo "- Provisioned!"
echo "Mounting all drives..." echo "Mounting all drives..."
mount -a mount -a
echo "Mounted!" echo "- Mounted!"
echo "Don't forget to set any new users' passwords!" echo "Don't forget to set any new users' passwords!"