diff options
author | Dan Fedele <dan.fedele@gmail.com> | 2022-11-06 17:14:38 -0500 |
---|---|---|
committer | Dan Fedele <dan.fedele@gmail.com> | 2022-11-06 17:14:38 -0500 |
commit | d35bf7f3c52f5719558f73b77ed1fc34e6997e89 (patch) | |
tree | 808ce3eabe1ee04d642bd7fcc5085867cff09c0f /setup.sh | |
parent | c1c81a728173638abf84ad21df34d398fa956240 (diff) |
Post CFC version test
Diffstat (limited to 'setup.sh')
-rw-r--r-- | setup.sh | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/setup.sh b/setup.sh new file mode 100644 index 0000000..50a7f46 --- /dev/null +++ b/setup.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +# Exit immediately on failure +set -eu + +if [[ $EUID -ne 0 ]]; then + echo "This script must be run as sudo or root." + exit 1 +fi + +PATH_TO_SCRIPT=$(dirname $0) +ZSH_FUNC_FILE="zsh_functions.zsh" +TMUX_FILE="tmux_conf" + +echo "***********************************" +echo "* Installing pip *" +echo "***********************************" + +curl -s https://bootstrap.pypa.io/get-pip.py -o /tmp/get-pip.py +python3 /tmp/get-pip.py --user --no-warn-script-location + +export PATH=$PATH:/root/.local/bin + +echo "***********************************" +echo "* Installing ansible *" +echo "***********************************" + +pip install ansible + +echo "***********************************" +echo "* Running Kali playbook *" +echo "***********************************" + +ansible-playbook ${PATH_TO_SCRIPT}/kali.yml --extra-vars "tmux=${PATH_TO_SCRIPT}/${TMUX_FILE} zsh_func=${PATH_TO_SCRIPT}/${ZSH_FUNC_FILE}" + +echo "***********************************" +echo "* Done! *" +echo "***********************************" + +echo "You should be set up. Check above for any errors." |