fix ssh key deployment
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Robert Kaussow 2020-10-01 00:29:49 +02:00
parent 0a07b57029
commit ef92d1ef9f
Signed by: xoxys
GPG Key ID: 65362AE74AF98B61
1 changed files with 2 additions and 2 deletions

View File

@ -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