-
New Feature
-
Resolution: Won't Do
-
Minor
-
None
-
ssh-slaves-plugin:1.22
Add the ability to inject a variable into the "Host" section of the form, ideally integrated with
Slave Setup Plugin.
My scenario:
I have an AWS slave with a dynamic IP.
I want to connect to it using ssh.
Via Slave Setup Plugin, I can set up a start script, in it I use:
export AWS_ACCESS_KEY_ID=MY_AWS_ACCES_KEY
export AWS_SECRET_ACCESS_KEY=MY_AWS_SECRET_ACCESS_KEY
export AWS_DEFAULT_REGION=MY_AWS_DEFAULT_REGION
aws --region MY_AWS_DEFAULT_REGION ec2 start-instances --instance-ids MY_INSTANCE_ID
aws --region MY_AWS_DEFAULT_REGION ec2 wait instance-status-ok --instance-ids MY_INSTANCE_ID
export NODE_IP=$(aws --regionMY_AWS_DEFAULT_REGION ec2 describe-instances --instance-ids MY_INSTANCE_ID --query "Reservations[*].Instances[*].PublicIpAddress" --output=text)
Now I have an IP stored in NODE_IP.
Problem is: I have no way to access NODE_IP in the "Host" part of the form, not even if I saved it as a text somewhere.
I'd like to be able to do that.