diff --git a/roles/elasticsearch/tasks/tls.yml b/roles/elasticsearch/tasks/tls.yml index 65b0ef0..06f4a58 100644 --- a/roles/elasticsearch/tasks/tls.yml +++ b/roles/elasticsearch/tasks/tls.yml @@ -13,9 +13,15 @@ path: /etc/retailor/cloudflare-token.env register: elk_cf_token_src_stat +- name: Ensure folder exists + ansible.builtin.command: + cmd: mkdir -p "{{ elk_lego_path }}" + when: elk_cf_token_src_stat.stat.exists + changed_when: true + - name: Move Cloudflare token file into place if found at staging path ansible.builtin.command: - cmd: mv /etc/retailor/cloudflare-token.env "{{ elk_cloudflare_token_env_file }}" + cmd: cp /etc/retailor/cloudflare-token.env "{{ elk_cloudflare_token_env_file }}" when: elk_cf_token_src_stat.stat.exists changed_when: true