railiance-infra/scripts/new-server.sh

13 lines
362 B
Bash
Raw Normal View History

#!/usr/bin/env bash
set -euo pipefail
NAME="${1:-}"
if [[ -z "$NAME" ]]; then
echo "Usage: scripts/new-server.sh <name>"
exit 1
fi
python3 scripts/new_host.py --name "$NAME" --type cpx21 --region nbg1 \
--role generic --image ubuntu-24.04 --user admin
git add inventory/servers.yaml
git commit -m "Add server ${NAME}"
echo "Added ${NAME}. Run: make apply"