Build out bootstrap role: admin user, sudoers, motd, keyboard, openssh, sysctl, bashrc, ssh keys

This commit is contained in:
DerLinkman
2026-07-18 00:07:56 +02:00
parent fbac01eea9
commit e510ac1f15
18 changed files with 294 additions and 11 deletions
+15 -5
View File
@@ -6,10 +6,20 @@
shell: /bin/bash
createhome: yes
state: present
password: "{{ admin_password }}"
password_lock: no
- name: Create sudoers.d directory if not exists
file:
path: /etc/sudoers.d
state: directory
mode: '0755'
- name: Set sudo privileges for admin user
lineinfile:
path: /etc/sudoers.d/10-admin
line: "admin ALL=(ALL) NOPASSWD:ALL"
validate: 'visudo -cf %s'
state: present
template:
src: sudoers-admin.j2
dest: /etc/sudoers.d/10-admin
owner: root
group: root
mode: '0440'
validate: 'visudo -cf %s'