playbook working, tidying up task order

This commit is contained in:
2025-11-02 23:33:13 -08:00
parent 378b740d93
commit c6d51f2a49
14 changed files with 220 additions and 375 deletions

33
tasks/no_autologin.yaml Normal file
View File

@ -0,0 +1,33 @@
---
- name: autologin - edit logind to reduce vterms to one
lineinfile:
dest: /etc/systemd/logind.conf
regexp: '^#NAutoVTs='
line: 'NAutoVTs=6'
backrefs: yes
- name: autologin - create getty tty1 service folder
file:
path: /etc/systemd/system/getty@tty1.service.d/
state: directory
mode: '0700'
- name: autologin - "delete {{ autologin_user }} .bash_aliases"
shell: "rm /home/{{ autologin_user }}/.bash_aliases"
- name: autologin - remove autologin override to getty tty1 service
shell: "rm /etc/systemd/system/getty@tty1.service.d/override.conf"
- name: autologin - "User setup - allow {{ autologin_user }} to smartctl"
shell: "rm /etc/sudoers.d/smartctl"
- name: autologin - Restart getty@tty1 service
systemd:
name: getty@tty1.service
state: restarted
enabled: true
masked: false
daemon_reload: true
...