edited provision script

This commit is contained in:
2025-03-28 18:26:57 +00:00
parent e2e83b9b7d
commit 20e0a3995f

View File

@@ -1,4 +1,6 @@
#!/bin/bash
# [!server!]
# [!sudo_password!]
apt_wait() {
while fuser /var/lib/dpkg/lock >/dev/null 2>&1; do
@@ -49,6 +51,10 @@ if [ ! -d /root/.ssh ]; then
touch /root/.ssh/authorized_keys
fi
# Set The Hostname If Necessary
echo "[!server!]" > /etc/hostname sed -i 's/127\.0\.0\.1.*localhost/127.0.0.1 [!server!].localdomain [!server!] localhost/' /etc/hosts
hostname [!server!]
# Setup Keystone User
useradd keystone
mkdir -p /home/keystone/.ssh
@@ -118,4 +124,4 @@ EOF
# Callback that the server is installed
curl --insecure --data "event_id=878&server_id=390&sudo_password=[!sudo_password!]&db_password=[!db_password!]&recipe_id=" https://keystone.test/provisioning/callback/app
curl --insecure --data "event_id=878&server_id=390&sudo_password=[!sudo_password!]&recipe_id=" https://keystone.test/provisioning/callback/app