diff --git a/tasks/setup.yml b/tasks/setup.yml index 0bebeca..c2b1091 100644 --- a/tasks/setup.yml +++ b/tasks/setup.yml @@ -31,12 +31,13 @@ when: __droneci_autoscaler_sshkey | length > 0 no_log: True - - name: Generate SSH key pair if missing + - name: Generate SSH key pair openssh_keypair: path: "{{ __droneci_autoscaler_workdir }}/ssh_key" type: ed25519 force: False state: present + when: not __droneci_autoscaler_sshkey | length > 0 - name: Write userdata template: