Reorganize project: separate playbooks/ and files/, add shell-setup (fish+nvim+tide+lazyvim)
This commit is contained in:
parent
9bed146909
commit
b5cabaf1fe
10 changed files with 155 additions and 15 deletions
15
playbooks/add-ssh-key.yml
Normal file
15
playbooks/add-ssh-key.yml
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
- name: Add SSH public key to VM user
|
||||
hosts: proxmox_vms
|
||||
gather_facts: false
|
||||
|
||||
vars:
|
||||
target_user: vrubel
|
||||
key_file: "{{ lookup('env', 'HOME') }}/.ssh/id_ed25519.pub"
|
||||
|
||||
tasks:
|
||||
- name: Add public key to authorized_keys
|
||||
ansible.posix.authorized_key:
|
||||
user: "{{ target_user }}"
|
||||
state: present
|
||||
key: "{{ lookup('file', key_file) }}"
|
||||
Loading…
Add table
Add a link
Reference in a new issue