forked from coop-cloud/authentik
fix(check_blueprints): reapply failed blueprints
This commit is contained in:
@@ -396,7 +396,7 @@ Brand.objects.filter(default=True).delete()
|
||||
|
||||
check_blueprints() {
|
||||
failed_blueprints=$(/manage.py shell -c """
|
||||
print(','.join(b.path for b in BlueprintInstance.objects.exclude(status='successful')))
|
||||
print(','.join(b.path for b in BlueprintInstance.objects.exclude(status='successful').exclude(name='Default - Out-of-box-experience flow')))
|
||||
""" 2>&1 | quieten | tail -n1)
|
||||
|
||||
if [ -z "$failed_blueprints" ]; then
|
||||
@@ -407,6 +407,13 @@ print(','.join(b.path for b in BlueprintInstance.objects.exclude(status='success
|
||||
echo "These Blueprints failed:"
|
||||
echo "$failed_blueprints" | tr ',' '\n'
|
||||
|
||||
echo "execute failed Blueprints"
|
||||
export AUTHENTIK_LOG_LEVEL=warning
|
||||
for bp in $(echo "$failed_blueprints" | tr ',' '\n'); do
|
||||
echo "Applying: $bp"
|
||||
ak apply_blueprint "/blueprints/$bp" 2>&1 | quieten
|
||||
done
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user