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