Add playbook for matej-server to create godan user with sudo and SSH key

This commit is contained in:
gemini
2026-04-15 19:52:40 +02:00
parent 1a32380c57
commit f1a7a21f0f

View File

@@ -0,0 +1,24 @@
---
- hosts: all
tasks:
- name: Create godan user
ansible.builtin.user:
name: godan
state: present
create_home: yes
shell: /bin/bash
become: yes
- name: Add godan user to sudo group
ansible.builtin.user:
name: godan
groups: sudo
append: yes
become: yes
- name: Add SSH authorized key for godan user
ansible.posix.authorized_key:
user: godan
state: present
key: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOBa7padbnxWe1Ct5jguWdJ1rhRrDqk6m6xJA0OJzkQv"
become: yes