fix: update SSH key path variable to use ssh_keys_file in configuration tasks

This commit is contained in:
2025-12-03 20:55:47 +01:00
parent 677fcf9916
commit 900d376933
2 changed files with 3 additions and 3 deletions

View File

@@ -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

View File

@@ -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