From cc9c2a670dce5bec4fd1022d4cba8dd53a337b60 Mon Sep 17 00:00:00 2001 From: Chris Harris Date: Wed, 11 May 2016 16:07:40 -0400 Subject: [PATCH] fix(Server): Add passphrase to cluster if it exists --- server/taskflows/hpccloud/taskflow/utility/__init__.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/server/taskflows/hpccloud/taskflow/utility/__init__.py b/server/taskflows/hpccloud/taskflow/utility/__init__.py index c3f19a77..18036155 100644 --- a/server/taskflows/hpccloud/taskflow/utility/__init__.py +++ b/server/taskflows/hpccloud/taskflow/utility/__init__.py @@ -130,6 +130,13 @@ def create_ec2_cluster(task, cluster, profile, ami): # Get the update to date cluster cluster = client.get('clusters/%s' % cluster['_id']) + # Add the passphrase if there is one. We need to do this as the clusters endpoints will not + # expose it for security reasons. + passphrase = parse('ssh.passphrase').find(profile) + if passphrase: + passphrase = passphrase[0].value + cluster['config']['ssh']['passphrase'] = passphrase + return cluster @cumulus.taskflow.task