From 876baeb4d455fb811897a00e31fb5231512becd6 Mon Sep 17 00:00:00 2001
From: Tom Barrett <tom@tombarrett.xyz>
Date: Fri, 21 Feb 2020 04:31:11 -0600
Subject: starting out nfs

---
 scripts/debian_roll | 11 +++++++++++
 1 file changed, 11 insertions(+)

(limited to 'scripts/debian_roll')

diff --git a/scripts/debian_roll b/scripts/debian_roll
index e7ae1ff..83b7d76 100755
--- a/scripts/debian_roll
+++ b/scripts/debian_roll
@@ -28,3 +28,14 @@ lxc-attach -n $NAME -- bash -c 'echo "AllowTcpForwarding yes" >> /etc/ssh/sshd_c
 lxc-attach -n $NAME -- bash -c 'echo "X11UseLocalhost yes" >> /etc/ssh/sshd_config'
 lxc-attach -n $NAME -- bash -c 'echo "PermitRootLogin yes" >> /etc/ssh/sshd_config'
 lxc-attach -n $NAME -- systemctl restart sshd
+
+# setup networking
+IP="$(lxc-info -n $NAME | grep IP | tr -s ' ' | cut -d ' ' -f 2)"
+sshpass -p $ROOT_PASS ssh-copy-id -o "StrictHostKeyChecking=no" root@$IP
+scp configs/$NAME/interfaces root@$IP:/etc/network/
+scp configs/hosts root@$IP:/etc/
+lxc-attach -n $NAME -- systemctl restart networking
+ssh-keygen -R "$IP"
+
+IP="$(lxc-info -n $NAME | grep IP | tr -s ' ' | cut -d ' ' -f 2)"
+sshpass -p $ROOT_PASS ssh-copy-id -o "StrictHostKeyChecking=no" root@$IP
-- 
cgit v1.2.3