-more tweaks to gui autologin

This commit is contained in:
mpelle426
2019-07-10 21:50:23 +01:00
parent e576055a4f
commit 5efd5d98f4
3 changed files with 22 additions and 12 deletions

View File

@@ -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: