Kapisi/bin/full-deploy

28 lines
585 B
Plaintext
Raw Permalink Normal View History

2022-04-19 12:01:03 -05:00
#!/bin/bash
2024-07-23 14:18:32 -05:00
# Ensure we are in the source directory.
cd $(dirname $0)/..
2022-04-19 12:01:03 -05:00
# Arguments
inventory="$1"
if [ "$inventory" == "-h" ] || [ "$inventory" == "--help" ]; then
echo "Usage: $0 -h # Usage"
echo " $0 # Run a complete deployment."
exit 0
elif [ -z "$inventory" ]; then
inventory="examples/msn0.yml"
fi
# Find the root of the git clone
while [ ! -d .git ]; do
cd ..
if [ "$PWD" == '/' ]; then
echo "This needs to be run from the Ubiqtorate checkout"
exit 3
fi
done
ansible-playbook -i examples/msn0.yml playbooks/deploy.yml