Skip to content

Commit 8027057

Browse files
committed
fix
1 parent 7d8a59a commit 8027057

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

infrastructure/server-setup/tasks/k8s/create-backup-server-secret.yml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,19 @@
1414
group: backup
1515
mode: '0600'
1616
force: false
17-
18-
- name: Set permissions for authorized_keys
19-
file:
20-
path: /home/backup/.ssh/authorized_keys
21-
owner: backup
22-
group: backup
23-
mode: 0600
24-
state: touch
17+
register: backup_keypair_result
2518

2619
- name: Add public key to authorized_keys
2720
ansible.builtin.lineinfile:
2821
path: /home/backup/.ssh/authorized_keys
29-
line: "{{ lookup('file', backup_ssh_key_path + '.pub') }}"
22+
line: "{{ backup_keypair_result.public_key }}"
3023
create: yes
3124
owner: backup
3225
group: backup
3326
mode: 0600
3427
when: backup_ssh_key_path is defined
3528

36-
- name: Copy private key from backup server to control node
29+
- name: Copy private key from backup server to control node (master)
3730
fetch:
3831
src: "{{ backup_ssh_key_path }}"
3932
dest: "./id_ed25519_backup"

0 commit comments

Comments
 (0)