Init commit

This commit is contained in:
2025-11-02 13:11:42 -08:00
commit 650b481463
16 changed files with 983 additions and 0 deletions

49
tasks/autologin.yaml Normal file
View File

@ -0,0 +1,49 @@
---
- name: autologin - edit logind to reduce vterms to one
lineinfile:
dest: /etc/systemd/logind.conf
regexp: '^#NAutoVTs=6'
line: 'NAutoVTs=1'
backrefs: yes
- name: autologin - create getty tty1 service folder
file:
path: /etc/systemd/system/getty@tty1.service.d/
state: directory
mode: '0700'
- name: autologin - "create {{ autologin_user }} .bashrc"
copy:
#dest: "/home/{{ autologin_user }}/.bash_aliases"
dest: "/home/{{ autologin_user }}/.bash_aliases"
owner: "{{ autologin_user }}"
group: "{{ autologin_user }}"
mode: '0600'
content: |
clear
cat {{ service_folder }}/hello-there.txt
sleep 4
{{ service_folder }}/drive_check.sh
- name: autologin - add autologin override to getty tty1 service
copy:
dest: /etc/systemd/system/getty@tty1.service.d/override.conf
content: |
[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin {{ autologin_user }} --noclear %I 38400 linux
# create hello_there ASCII art
- name: autologin - generate hello_there.txt for the lulz
include_tasks: hello_there.yaml
- name: autologin - Restart getty@tty1 service
systemd:
name: getty@tty1.service
state: restarted
enabled: true
masked: false
daemon_reload: true
...