Fixed escape char

This commit is contained in:
butomo1989 2018-08-27 14:30:51 +02:00
parent f2c6ab79bb
commit 73418a8b4f

View file

@ -104,7 +104,7 @@ data "aws_ami" "geny_aws_$index" {
resource "aws_key_pair" "geny_key_$index" { resource "aws_key_pair" "geny_key_$index" {
provider = "aws.provider_$index" provider = "aws.provider_$index"
public_key = "${file("~/.ssh/id_rsa.pub")}" public_key = "\${file("~/.ssh/id_rsa.pub")}"
} }
resource "aws_instance" "geny_aws_$index" { resource "aws_instance" "geny_aws_$index" {
@ -142,9 +142,16 @@ _EOF
./terraform plan ./terraform plan
./terraform apply -auto-approve ./terraform apply -auto-approve
sleep(10)
# Connect with adb # Connect with adb
# TODO echo "Enable adb for all instances"
# ssh -i ~/.ssh/id_rsa -oStrictHostKeyChecking=no $(./terraform output public_dns_$index.id) 'setprop persist.sys.usb.config adb && exit' for ((i=index;i>=1;i--)); do
dns=$(./terraform output public_dns_$index)
echo $dns
ssh -i ~/.ssh/id_rsa -oStrictHostKeyChecking=no $dns 'setprop persist.sys.usb.config adb && exit'
echo "Adb is enabled"
done
#TODO
} }