init commit

This commit is contained in:
2025-07-21 14:26:07 -05:00
commit 6a683a7a38
25 changed files with 635 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
---
- name: Add SSH key from Gitea
hosts: all
become: true
tasks:
- name: Ensure .ssh directory exists
file:
path: "/home/{{ username }}/.ssh"
state: directory
owner: "{{ username }}"
group: "{{ username }}"
mode: '0700'
- name: Add public key from Gitea to authorized_keys
ansible.posix.authorized_key:
user: "{{ username }}"
key: "https://gitea.purpleraft.com/{{ username }}.keys"
state: present
manage_dir: false # we already ensured it