Check if certs already exists and skip the generation

This commit is contained in:
Jose M 2020-06-25 17:23:44 +02:00
parent 6427c5b4cc
commit 4050cef2be
No known key found for this signature in database
GPG Key ID: 790179D6924E10FF

View File

@ -1,4 +1,10 @@
---
- name: Check if certificates already exists
stat:
path: "{{ local_certs_path }}"
register: certificates_folder
delegate_to: localhost
- block:
- name: Local action | Create local temporary directory for certificates generation
@ -69,4 +75,6 @@
run_once: true
delegate_to: localhost
tags:
- generate-certs
- generate-certs
when:
- not certificates_folder.stat.exists