From f68da2cb9881a10f74b9984fcade1fa0639c9193 Mon Sep 17 00:00:00 2001 From: Jose Date: Mon, 1 Dec 2025 19:44:03 +0100 Subject: [PATCH] modified: tasks/preflight-checks.yml --- tasks/preflight-checks.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/tasks/preflight-checks.yml b/tasks/preflight-checks.yml index 58f3d0a..47f2a6a 100644 --- a/tasks/preflight-checks.yml +++ b/tasks/preflight-checks.yml @@ -39,13 +39,29 @@ msg: "Storage pool '{{ storage }}' not found. Available pools: run 'pvesm status'" when: storage_check.rc != 0 +- name: Combine SSH public keys into one file + ansible.builtin.copy: + dest: '{{ ssh_keys_file }}' + content: | + {% for key in ssh_public_keys %} + {{ key }} + {% endfor %} + mode: '0644' + - name: "[PREFLIGHT] Check SSH key file exists" ansible.builtin.stat: - path: "{{ ssh_key_path | expanduser }}" + path: "{{ ssh_keys_file | expanduser }}" register: ssh_key_file failed_when: not ssh_key_file.stat.exists changed_when: false +# - name: "[PREFLIGHT] Check SSH key file exists" +# ansible.builtin.stat: +# path: "{{ ssh_key_path | expanduser }}" +# register: ssh_key_file +# failed_when: not ssh_key_file.stat.exists +# changed_when: false + - name: "[PREFLIGHT] Validate VM ID is unique" ansible.builtin.command: "test ! -f /etc/pve/qemu-server/{{ vm_id }}.conf" changed_when: false