fix ssh key deployment
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Robert Kaussow 2020-10-01 00:29:49 +02:00
parent 0a07b57029
commit ef92d1ef9f
No known key found for this signature in database
GPG Key ID: 65362AE74AF98B61

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