Clone shirenn's configuration
This commit is contained in:
19
roles/systemd/tasks/main.yml
Normal file
19
roles/systemd/tasks/main.yml
Normal file
@ -0,0 +1,19 @@
|
||||
---
|
||||
|
||||
- name: Deploy logind configuration
|
||||
template:
|
||||
src: 'logind.conf.j2'
|
||||
dest: '/etc/systemd/logind.conf'
|
||||
become: yes
|
||||
|
||||
- name: Create autologin directory on tty1
|
||||
file:
|
||||
path: '/etc/systemd/system/getty@tty1.service.d'
|
||||
state: directory
|
||||
become: yes
|
||||
|
||||
- name: Copy autologin template file
|
||||
template:
|
||||
src: 'override.conf.j2'
|
||||
dest: '/etc/systemd/system/getty@tty1.service.d/override.conf'
|
||||
become: yes
|
37
roles/systemd/templates/logind.conf.j2
Normal file
37
roles/systemd/templates/logind.conf.j2
Normal file
@ -0,0 +1,37 @@
|
||||
# This file is part of systemd.
|
||||
#
|
||||
# systemd is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 2.1 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# Entries in this file show the compile time defaults.
|
||||
# You can change settings by editing this file.
|
||||
# Defaults can be restored by simply deleting this file.
|
||||
#
|
||||
# See logind.conf(5) for details.
|
||||
|
||||
[Login]
|
||||
#NAutoVTs=6
|
||||
#ReserveVT=6
|
||||
#KillUserProcesses=no
|
||||
#KillOnlyUsers=
|
||||
#KillExcludeUsers=root
|
||||
#InhibitDelayMaxSec=5
|
||||
HandlePowerKey=ignore
|
||||
#HandleSuspendKey=suspend
|
||||
#HandleHibernateKey=hibernate
|
||||
#HandleLidSwitch=suspend
|
||||
#HandleLidSwitchExternalPower=suspend
|
||||
#HandleLidSwitchDocked=ignore
|
||||
#PowerKeyIgnoreInhibited=no
|
||||
#SuspendKeyIgnoreInhibited=no
|
||||
#HibernateKeyIgnoreInhibited=no
|
||||
#LidSwitchIgnoreInhibited=yes
|
||||
#HoldoffTimeoutSec=30s
|
||||
#IdleAction=ignore
|
||||
#IdleActionSec=30min
|
||||
#RuntimeDirectorySize=10%
|
||||
#RemoveIPC=yes
|
||||
#InhibitorsMax=8192
|
||||
#SessionsMax=8192
|
3
roles/systemd/templates/override.conf.j2
Normal file
3
roles/systemd/templates/override.conf.j2
Normal file
@ -0,0 +1,3 @@
|
||||
[Service]
|
||||
ExecStart=
|
||||
ExecStart=-/usr/bin/agetty --autologin {{ user.name }} --noclear %I $TERM
|
Reference in New Issue
Block a user