Paul Belanger bbc4c5b920
Only run once our delegate_to locahost commands
In a multi node setup, we only want this logic to be run one across
all hosts.

Change-Id: I4ebb62f76d4ff7363635bee7073c2d7e8f0ad70e
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-07-21 16:21:13 -04:00

12 lines
349 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: create-key-and-replace.yaml
when: zuul_temp_ssh_key_stat is defined