summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <lwirzenius@wikimedia.org>2020-09-18 16:30:54 +0300
committerLars Wirzenius <lwirzenius@wikimedia.org>2020-09-18 16:30:54 +0300
commit44a3690c10c3de10ac8fa9c3da5667c5c173bd6f (patch)
tree0ac752c0793a11386ec86637d96c57d6fc1ae9fb
parent1fa4d74be20a1aa7a94e44070b445fc5a224387b (diff)
downloadick-contractor-44a3690c10c3de10ac8fa9c3da5667c5c173bd6f.tar.gz
ansible for contractor
-rwxr-xr-xcontra.sh8
-rw-r--r--ssh.config.in2
2 files changed, 5 insertions, 5 deletions
diff --git a/contra.sh b/contra.sh
index 341c34a..2c64872 100755
--- a/contra.sh
+++ b/contra.sh
@@ -30,14 +30,12 @@ main()
./vm-qemu.sh "$image" "$port" "$pubkey" > qemu.out &
pid="$!"
-
wait_for_ssh -F ssh.config contractor
- echo "wait a minute"
- sleep 60
+ ANSIBLE_SSH_ARGS="-F ssh.config" ansible-playbook -i ansible.hosts ansible.yml
- ssh -F ssh.config contractor '(sleep 2; sudo poweroff) &'
- wait "$pid"
+# ssh -F ssh.config contractor '(sleep 2; sudo poweroff) &'
+ : wait "$pid"
}
main "$@"
diff --git a/ssh.config.in b/ssh.config.in
index ad023ce..b020e69 100644
--- a/ssh.config.in
+++ b/ssh.config.in
@@ -4,3 +4,5 @@ user debian
port <PORT>
userknownhostsfile /dev/null
stricthostkeychecking accept-new
+controlmaster auto
+controlpersist 60s