diff --git a/files/id_ed25519_proxmox.pub b/files/id_ed25519_proxmox.pub new file mode 100644 index 0000000..86de8b0 --- /dev/null +++ b/files/id_ed25519_proxmox.pub @@ -0,0 +1 @@ +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPcfT2ouxUaCwGBTT5OyR//M/9N5EB2PjXUoPT+ncASf proxmox diff --git a/files/id_ed25519_semaphore.pub b/files/id_ed25519_semaphore.pub new file mode 100644 index 0000000..d09d917 --- /dev/null +++ b/files/id_ed25519_semaphore.pub @@ -0,0 +1 @@ +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAZYhHsurKUxGWITSL6WTBqwI7DT9OCvwdK55htUWVKB semaphore diff --git a/playbooks/copy-ssh-key.yaml b/playbooks/copy-ssh-key.yaml new file mode 100644 index 0000000..4c10812 --- /dev/null +++ b/playbooks/copy-ssh-key.yaml @@ -0,0 +1,21 @@ +- hosts: all + become: yes + + vars: + ssh_files: "{{ playbook_dir }}/../files" + + tasks: + - debug: + var: playbook_dir + + - name: Install Proxmox Root SSH key + authorized_key: + user: root + key: "{{ lookup('file', ssh_files + '/id_ed25519_proxmox.pub') }}" + manage_dir: true + + - name: Install Semaphore Root SSH key + authorized_key: + user: root + key: "{{ lookup('file', ssh_files + '/id_ed25519_semaphore.pub') }}" + manage_dir: true