-Numerous changes to make more generic. Use varialbe for username. Defaults to "pi

-
This commit is contained in:
2022-05-08 14:40:16 +00:00
parent fc0b355f1d
commit d539e40943
36 changed files with 137 additions and 109 deletions

View File

@@ -1,3 +1,3 @@
[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin pi --noclear %I \$TERM
ExecStart=-/sbin/agetty --autologin '{{ def_username }}' --noclear %I \$TERM

View File

@@ -41,11 +41,11 @@
group: root
- name: autologin replacement
become: true
# command: '/bin/sed /etc/lightdm/lightdm.conf -i -e "s/^\(#\|\)autologin-user=.*/autologin-user=pi/"'
# command: '/bin/sed /etc/lightdm/lightdm.conf -i -e "s/^\(#\|\)autologin-user=.*/autologin-user={{ def_username }}/"'
lineinfile:
path: /etc/lightdm/lightdm.conf
regexp: '^#autologin-user='
line: 'autologin-user=pi'
line: 'autologin-user={{ def_username }}'
- name: force systemd reload
become: true
systemd: