From ef92d1ef9fa64e278a14527db07b134e737d1a4a Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 1 Oct 2020 00:29:49 +0200 Subject: [PATCH] fix ssh key deployment --- tasks/setup.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/setup.yml b/tasks/setup.yml index e63843d..b7eeff8 100644 --- a/tasks/setup.yml +++ b/tasks/setup.yml @@ -5,7 +5,7 @@ - name: Register SSH key set_fact: - __droneci_autoscaler_sshkey: "{{ inst.sshkey | default(droneci_autoscaler_sshkey) | default(False) }}" + __droneci_autoscaler_sshkey: "{{ (inst.sshkey | default(droneci_autoscaler_sshkey)) | default('') }}" - block: - name: Ensure service directory exists @@ -28,7 +28,7 @@ content: "{{ __droneci_autoscaler_sshkey }}" dest: "{{ __droneci_autoscaler_workdir }}/ssh_key" mode: 0600 - when: __droneci_autoscaler_sshkey | bool + when: __droneci_autoscaler_sshkey | legth > 0 no_log: True - name: Generate SSH key pair if missing