removed static pointing to ~/.ssh/backup SSH private key

This commit is contained in:
Frank Dornheim 2023-03-19 11:36:43 +01:00
parent 273d06d18e
commit 1186cf1943

View File

@ -16,7 +16,7 @@
- name: Generate an OpenSSH keypair - name: Generate an OpenSSH keypair
community.crypto.openssh_keypair: community.crypto.openssh_keypair:
path: "{{ backup_user_info.home }}/.ssh/backup" path: "{{ borg_ssh_key_file_path }}"
mode: "0600" mode: "0600"
type: "{{ borg_ssh_key_type }}" type: "{{ borg_ssh_key_type }}"
owner: "{{ borgbackup_user }}" owner: "{{ borgbackup_user }}"
@ -24,14 +24,14 @@
- name: Set key permission - name: Set key permission
ansible.builtin.file: ansible.builtin.file:
path: "{{ backup_user_info.home }}/.ssh/backup.pub" path: "{{ borg_ssh_key_file_path }}.pub"
mode: "0644" mode: "0644"
owner: "{{ borgbackup_user }}" owner: "{{ borgbackup_user }}"
group: "{{ borgbackup_group }}" group: "{{ borgbackup_group }}"
- name: Read ssh key - name: Read ssh key
ansible.builtin.slurp: ansible.builtin.slurp:
src: "{{ backup_user_info.home }}/.ssh/backup.pub" src: "{{ borg_ssh_key_file_path }}.pub"
register: backup_local_ssh_key register: backup_local_ssh_key
- name: Print key - name: Print key