From 900d376933386ab232d5f2427be81b797deaee6e Mon Sep 17 00:00:00 2001 From: Jose Date: Wed, 3 Dec 2025 20:55:47 +0100 Subject: [PATCH] fix: update SSH key path variable to use ssh_keys_file in configuration tasks --- tasks/configure-vm.yml | 4 ++-- templates/cloudinit_userdata.yaml.j2 | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tasks/configure-vm.yml b/tasks/configure-vm.yml index 8fef276..f184cd4 100644 --- a/tasks/configure-vm.yml +++ b/tasks/configure-vm.yml @@ -139,13 +139,13 @@ - name: "[CONFIG] Verify SSH key is readable" ansible.builtin.stat: - path: "{{ ssh_key_path | expanduser }}" + path: "{{ ssh_keys_file | expanduser }}" register: ssh_key_stat failed_when: not ssh_key_stat.stat.readable - name: "[CONFIG] Copy SSH public key to snippets" ansible.builtin.copy: - src: "{{ ssh_key_path | expanduser }}" + src: "{{ ssh_keys_file | expanduser }}" dest: "/var/lib/vz/snippets/{{ vm_id }}-sshkey.pub" mode: "0644" register: ssh_snippet diff --git a/templates/cloudinit_userdata.yaml.j2 b/templates/cloudinit_userdata.yaml.j2 index 43bdb99..9c86e83 100644 --- a/templates/cloudinit_userdata.yaml.j2 +++ b/templates/cloudinit_userdata.yaml.j2 @@ -8,7 +8,7 @@ users: lock_passwd: false passwd: {{ ci_password | password_hash('sha512') }} ssh_authorized_keys: - - {{ lookup('file', ssh_key_path) }} + - {{ lookup('file', ssh_keys_file) }} chpasswd: expire: false