From ac45ed064b096f715805d21638ee9286804d12ef Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sun, 24 Jun 2018 11:11:49 +0100 Subject: Neaten up SSH handling Explicitly use the specified private key where possible. Also, use a struct for the user, address and private key. --- app/controllers/govuk_guix/revisions_controller.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'app/controllers') diff --git a/app/controllers/govuk_guix/revisions_controller.rb b/app/controllers/govuk_guix/revisions_controller.rb index 6e75e82..17634dd 100644 --- a/app/controllers/govuk_guix/revisions_controller.rb +++ b/app/controllers/govuk_guix/revisions_controller.rb @@ -33,12 +33,8 @@ class GovukGuix::RevisionsController < ApplicationController # Assume that the AWS backend is in use backend = Backends::TerraformAws.first - remote_host = backend.backend_latest_terraform_state.output_value( - 'guix_daemon_public_dns' - ) - options = { - run_remotely_on_host: "ubuntu@#{remote_host}" + run_remotely_on_host: backend.build_remote_host } end -- cgit v1.2.3