-
Notifications
You must be signed in to change notification settings - Fork 2
/
bootstrap.sh
executable file
·31 lines (25 loc) · 1.21 KB
/
bootstrap.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
# Installs any and all dependencies required to get the toolbox install.sh script to work
# Check if the script is running as root (in a Docker container). If so, we do
# not need to use sudo. If not, then we do need to use sudo.
if [ "$(id -u)" = "0" ]; then
SUDO=""
else
SUDO="sudo"
fi
# Check if Ansible is installed
if ! command -v ansible &> /dev/null; then
echo "Ansible is not installed. Installing Ansible..."
$SUDO apt-get update
$SUDO apt-get install ansible -y
echo "Ansible has been installed."
else
echo "Ansible is already installed."
fi
echo "╔════════════════════════════════════════════════════════════╗"
echo "║ ║"
echo "║ You should be good to run install.sh now ║"
echo "║ ║"
echo "╚════════════════════════════════════════════════════════════╝"