playbook working, tidying up task order
This commit is contained in:
33
tasks/no_autologin.yaml
Normal file
33
tasks/no_autologin.yaml
Normal 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
|
||||
|
||||
...
|
||||
Reference in New Issue
Block a user