diff --git a/roles/opendistro/opendistro-elasticsearch/tasks/local_actions.yml b/roles/opendistro/opendistro-elasticsearch/tasks/local_actions.yml index 6885276d..ae9d6a32 100644 --- a/roles/opendistro/opendistro-elasticsearch/tasks/local_actions.yml +++ b/roles/opendistro/opendistro-elasticsearch/tasks/local_actions.yml @@ -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 \ No newline at end of file + - generate-certs + when: + - not certificates_folder.stat.exists \ No newline at end of file