-updates for autologin on gui

This commit is contained in:
mpelle426
2019-07-10 16:10:59 +01:00
parent 07b955bac7
commit a5528dc0fa
3 changed files with 34 additions and 2 deletions

View File

@@ -24,4 +24,30 @@
- { regexp: '#framebuffer_width=1280', line: 'framebuffer_width=1280' }
- { regexp: '#framebuffer_height=720', line: 'framebuffer_height=1024' }
become: true
- name: enable autologin symlink
become: true
file:
src: /lib/systemd/system/getty@.service
dest: /etc/systemd/system/getty.target.wants/getty@tty1.service
owner: root
group: root
state: link
- name: autologin systemd
become: true
lineinfile:
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' }
- name: autologin replacement
become: true
lineinfile:
path: /etc/lightdm/lightdm.conf
regexp: '^\(#\|\)autologin-user=.*'
line: 'autologin-user=pi'
- name: force systemd reload
become: true
systemd:
daemon_reload: yes