mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-28 13:57:43 +00:00
Only validate authorized_keys when defined and skip SSH key setup when no keys are configured for a user. https://chatgpt.com/share/695fac99-c6a4-800f-8914-1d56c63e8ccf
User
Description
This role configures a basic user environment (shell dotfiles and SSH authorized_keys)
for a user selected via user_key.
Single Point of Truth (SPOT)
User data is defined under users.<key> and referenced exclusively via user_key.
Resolution rules:
user_usernameis resolved fromusers[user_key].username(fallback:user_key)- Home path and ownership are based on
user_username - SSH keys are read from
users[user_key].authorized_keys
Required input
user_key
Optional user fields
users.<user_key>.username(defaults to<user_key>)users.<user_key>.authorized_keys(list; may be empty)