File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed
infrastructure/server-setup/tasks/k8s Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change 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"
You can’t perform that action at this time.
0 commit comments