-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

@@ -0,0 +1,3 @@
[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin pi --noclear %I \$TERM

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:

View File

@@ -1,4 +1,9 @@
---
- hosts: pi
roles:
- pi
---
- hosts: all
name: install programs and libraries
become: true
apt:
name: [ 'expect', 'ftp', 'cadaver', 'iperf', 'iperf3', 'libpcap0.8', 'libsctp1', 'libsctp-dev', 'libncurses-dev', 'libssl-dev', 'libpcap-dev', 'vim', 'mc', 'smbclient', 'ncurses-dev', 'build-essential', 'openvpn', 'lightdm', 'lxde', 'realvnc-vnc-server', 'aptitude', 'chromium-browser', 'raspberrypi-ui-mods' ]
update_cache: true
state: present