Compare commits

..

2 commits

2 changed files with 9 additions and 0 deletions

View file

@ -1,3 +1,7 @@
borg_public_key: "AAAAC3NzaC1lZDI1NTE5AAAAIBTag7YToG5W+H2kEUz40kOH+7cs0Lp3owFFKkmHBiWM" borg_public_key: "AAAAC3NzaC1lZDI1NTE5AAAAIBTag7YToG5W+H2kEUz40kOH+7cs0Lp3owFFKkmHBiWM"
dataserver_public_key: "AAAAC3NzaC1lZDI1NTE5AAAAIJsLVptkoOwmxs6DnenN8u7Q1Tm/Psh0QdI6vjrTgb6D" dataserver_public_key: "AAAAC3NzaC1lZDI1NTE5AAAAIJsLVptkoOwmxs6DnenN8u7Q1Tm/Psh0QdI6vjrTgb6D"
backup_location: "/root/homeserver_backup" backup_location: "/root/homeserver_backup"
admin_public_keys:
- "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINUZp4BCxf7uLa1QWonx/Crf8tYZ5MKIZ+EuaBa82LrV user@user-laptop"
- "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOodpLr+FDRyKyHjucHizNLVFHZ5AQmE9GmxMnOsSoaw pimkunis@thinkpadpim"

View file

@ -1,3 +1,8 @@
- name: Add admins' authorized keys
authorized_key:
key: "{{ item }}"
user: "{{ ansible_user_id }}"
loop: "{{ admin_public_keys }}"
- name: Copy host public key - name: Copy host public key
template: template:
src: "{{ role_path }}/templates/ssh_host_ed25519_key.pub.j2" src: "{{ role_path }}/templates/ssh_host_ed25519_key.pub.j2"