-more autologin fixes

This commit is contained in:
mpelle426
2019-07-10 18:15:08 +01:00
parent 0f7bcb5b76
commit e576055a4f

View File

@@ -34,19 +34,16 @@
state: link
- name: autologin systemd
become: true
lineinfile:
blockinfile:
path: /etc/systemd/system/getty@tty1.service.d/autologin.conf
line: {{ item.line }}
with_items:
- { '[Service]' }
- { 'ExecStart=' }
- { 'ExecStart=-/sbin/agetty --autologin pi --noclear %I \$TERM' }
create: yes
block: |
[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin pi --noclear %I \$TERM
- name: autologin replacement
become: true
lineinfile:
path: /etc/lightdm/lightdm.conf
regexp: '^\(#\|\)autologin-user=.*'
line: 'autologin-user=pi'
command: '/bin/sed /etc/lightdm/lightdm.conf -i -e "s/^\(#\|\)autologin-user=.*/autologin-user=pi/"'
- name: force systemd reload
become: true
systemd: