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"
|
- name: "[CONFIG] Verify SSH key is readable"
|
||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
path: "{{ ssh_key_path | expanduser }}"
|
path: "{{ ssh_keys_file | expanduser }}"
|
||||||
register: ssh_key_stat
|
register: ssh_key_stat
|
||||||
failed_when: not ssh_key_stat.stat.readable
|
failed_when: not ssh_key_stat.stat.readable
|
||||||
|
|
||||||
- name: "[CONFIG] Copy SSH public key to snippets"
|
- name: "[CONFIG] Copy SSH public key to snippets"
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "{{ ssh_key_path | expanduser }}"
|
src: "{{ ssh_keys_file | expanduser }}"
|
||||||
dest: "/var/lib/vz/snippets/{{ vm_id }}-sshkey.pub"
|
dest: "/var/lib/vz/snippets/{{ vm_id }}-sshkey.pub"
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
register: ssh_snippet
|
register: ssh_snippet
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ users:
|
|||||||
lock_passwd: false
|
lock_passwd: false
|
||||||
passwd: {{ ci_password | password_hash('sha512') }}
|
passwd: {{ ci_password | password_hash('sha512') }}
|
||||||
ssh_authorized_keys:
|
ssh_authorized_keys:
|
||||||
- {{ lookup('file', ssh_key_path) }}
|
- {{ lookup('file', ssh_keys_file) }}
|
||||||
|
|
||||||
chpasswd:
|
chpasswd:
|
||||||
expire: false
|
expire: false
|
||||||
|
|||||||
Reference in New Issue
Block a user