ensure folder exists before copy

This commit is contained in:
2026-08-09 23:24:43 +02:00
parent d1a9657836
commit 810fe57db8
+7 -1
View File
@@ -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