-more tweaks to gui autologin
This commit is contained in:
3
roles/pi/files/autologin.conf
Normal file
3
roles/pi/files/autologin.conf
Normal file
@@ -0,0 +1,3 @@
|
||||
[Service]
|
||||
ExecStart=
|
||||
ExecStart=-/sbin/agetty --autologin pi --noclear %I \$TERM
|
||||
@@ -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:
|
||||
|
||||
13
temp.yaml
13
temp.yaml
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user