This commit is contained in:
+1
-6
@@ -49,11 +49,6 @@ resource "null_resource" "staging_lxc" {
|
|||||||
"apt-get install -y hugo nginx git rsync curl",
|
"apt-get install -y hugo nginx git rsync curl",
|
||||||
"systemctl enable --now nginx",
|
"systemctl enable --now nginx",
|
||||||
"useradd -m -s /bin/bash deploy 2>/dev/null || true",
|
"useradd -m -s /bin/bash deploy 2>/dev/null || true",
|
||||||
"mkdir -p /home/deploy/.ssh",
|
|
||||||
"chmod 700 /home/deploy/.ssh",
|
|
||||||
"echo '${var.ssh_public_key}' >> /home/deploy/.ssh/authorized_keys",
|
|
||||||
"chmod 600 /home/deploy/.ssh/authorized_keys",
|
|
||||||
"chown -R deploy:deploy /home/deploy/.ssh",
|
|
||||||
"mkdir -p /var/www/html",
|
"mkdir -p /var/www/html",
|
||||||
"chown -R deploy:deploy /var/www/html",
|
"chown -R deploy:deploy /var/www/html",
|
||||||
"echo '✅ Staging VM Setup complete!'"
|
"echo '✅ Staging VM Setup complete!'"
|
||||||
@@ -62,7 +57,7 @@ resource "null_resource" "staging_lxc" {
|
|||||||
connection {
|
connection {
|
||||||
type = "ssh"
|
type = "ssh"
|
||||||
user = "root"
|
user = "root"
|
||||||
private_key = file("~/.ssh/deploy")
|
private_key = file(pathexpand("~/.ssh/deploy"))
|
||||||
host = var.staging_ip
|
host = var.staging_ip
|
||||||
timeout = "5m"
|
timeout = "5m"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user