Make updating roles optional to help development
This commit is contained in:
parent
8a23b2bb19
commit
674372ad74
1 changed files with 14 additions and 1 deletions
15
deploy.sh
15
deploy.sh
|
@ -2,12 +2,25 @@
|
|||
|
||||
set -eu
|
||||
|
||||
UPDATE=true
|
||||
if [ $# -eq 1 ] && [ "$1" = "-n" ]; then
|
||||
UPDATE=false
|
||||
shift
|
||||
fi
|
||||
|
||||
if [ $# -gt 0 ]; then
|
||||
echo "Usage: $(basename "$0") [-n]" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# run sudo to cache creds
|
||||
sudo /bin/true
|
||||
|
||||
# update modules and check depencies
|
||||
git pull
|
||||
git submodule update --init --recursive
|
||||
if "$UPDATE" || [ ! -f roles/.git ]; then
|
||||
git submodule update --init --recursive
|
||||
fi
|
||||
if ! rpm -q ansible > /dev/null; then
|
||||
sudo dnf -y install ansible
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue