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