fix: update SSH key path variable to use ssh_keys_file in configuration tasks
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user