You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
823 B
Bash

#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )";
source "$DIR/_common.sh";
function is_update() {
[ -d /playbook.old ];
return $?;
}
cd "$DIR";
echo "localhost ansible_connection=local" > hosts
if ansible-playbook --diff -i hosts site.yml; then
if is_update; then
update_finished;
exit 1;
else
echo "Dieses Passwort wurde für das admin-Konto generiert:"
echo "$(cat credentials/admin)";
ask_yes_no change_pass "Möchten Sie das Passwort ändern?";
if $change_pass; then
retry_on_fail "Fehler bei der Passwortänderung, bitte versuchen sie es erneut!" passwd admin;
fi
setup_finished;
exit 1;
fi
fi
if is_update; then
update_failed;
else
setup_failed;
fi
exit 1;