-more tweaks to gui autologin
This commit is contained in:
@@ -34,16 +34,18 @@
|
||||
state: link
|
||||
- name: autologin systemd
|
||||
become: true
|
||||
blockinfile:
|
||||
path: /etc/systemd/system/getty@tty1.service.d/autologin.conf
|
||||
create: yes
|
||||
block: |
|
||||
[Service]
|
||||
ExecStart=
|
||||
ExecStart=-/sbin/agetty --autologin pi --noclear %I \$TERM
|
||||
copy:
|
||||
src: "{{ role_path }}/files/autologin.conf"
|
||||
dest: "/etc/systemd/system/getty@tty1.service.d/autologin.conf"
|
||||
owner: root
|
||||
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=pi/"'
|
||||
lineinfile:
|
||||
path: /etc/lightdm/lightdm.conf
|
||||
regexp: '^#autologin-user='
|
||||
line: 'autologin-user=pi'
|
||||
- name: force systemd reload
|
||||
become: true
|
||||
systemd:
|
||||
|
||||
Reference in New Issue
Block a user