zuul-jobs/roles/add-build-sshkey/tasks/main.yaml
Albin Vass c4b31748cf add-build-sshkey: update include to include_tasks
Change-Id: Ie5d3688ef647d25e4446cfe648b795e6c9ba0ac0
2020-05-26 10:03:58 +02:00

12 lines
360 B
YAML

- name: Check to see if ssh key was already created for this build
stat:
path: "{{ zuul_temp_ssh_key }}"
register: zuul_temp_ssh_key_stat
delegate_to: localhost
run_once: true
failed_when: false
- name: Create a new key in workspace based on build UUID
include_tasks: create-key-and-replace.yaml
when: not zuul_temp_ssh_key_stat.stat.exists