Add KDE plasma as another kiosk system option.

This commit is contained in:
Andreas B. Mundt 2019-10-26 09:15:16 +02:00
parent fef999e7fe
commit b3b8d3d342
8 changed files with 72 additions and 4 deletions

View file

@ -9,7 +9,7 @@
## This interface provides the default route:
if_wan: "{{ ansible_default_ipv4.interface }}"
## Use the first remaining interface for the LAN:
if_lan: "{{ ansible_interfaces | difference([if_wan, 'lo']) | first}}"
if_lan: "{{ ansible_interfaces | difference([if_wan, 'lo']) | first }}"
## Add 'hostname=XXX' to the installer boot parameters if necessary:
hostname: "{{ ansible_hostname }}"
ipaddr_lan: 192.168.0.10
@ -28,7 +28,7 @@
- name: validate if interfaces are available
fail:
msg: "Interfaces {{ ansible_interfaces }} found. WAN: '{{ if_wan }}', LAN: '{{ if_lan }}'. Two NICs needed."
when: if_lan not in ansible_interfaces or if_wan not in ansible_interfaces or if_lan == if_wan
when: (if_lan not in ansible_interfaces) or (if_wan not in ansible_interfaces) or (if_lan == if_wan)
roles:
- up2date-debian

View file

@ -17,5 +17,7 @@
roles:
- up2date-debian
## Choose either gnome or KDE:
- gnome
#- kde
- kiosk

View file

@ -0,0 +1,3 @@
- name: update grub
command: update-grub
listen: update grub

21
roles/kde/tasks/main.yml Normal file
View file

@ -0,0 +1,21 @@
- name: kde plasma desktop
apt:
name:
- task-kde-desktop
- cups
state: latest
## Bug #698504
- name: allow print job management
replace:
dest: "/etc/cups/cups-files.conf"
regexp: '^(SystemGroup lpadmin)$'
replace: '\1 root'
- name: enable splash screen
replace:
dest: "/etc/default/grub"
regexp: '"quiet"$'
replace: '"quiet splash"'
notify: update grub

8
roles/kiosk/files/kde5rc Normal file
View file

@ -0,0 +1,8 @@
[KDE Action Restrictions][$i]
action/start_new_session=false
action/switch_user=false
action/lock_screen=false
action/logout=false
[General]
BrowserApplication=firefox-esr.desktop

View file

@ -0,0 +1,3 @@
[Daemon][$i]
Autolock=false
LockOnResume=false

View file

@ -12,24 +12,51 @@
apt: name={{ extra_pkgs_bpo }} state=latest default_release={{ deb_release }}-backports
when: extra_pkgs_bpo|length
## Check which display manager is used:
- name: check if gdm3 is installed
stat: path=/etc/gdm3/daemon.conf
register: gdm3
- name: enable auto login
- name: check if sddm is installed
stat: path=/usr/bin/sddm
register: sddm
## gdm3:
- name: enable auto login in gdm3
when: gdm3.stat.exists == true
lineinfile:
dest: /etc/gdm3/daemon.conf
insertafter: '^#\s*AutomaticLoginEnable = true'
line: 'AutomaticLoginEnable = true'
- name: auto login user
- name: auto login user in gdm3
when: gdm3.stat.exists == true
lineinfile:
dest: /etc/gdm3/daemon.conf
insertafter: '^#\s*AutomaticLogin = '
line: 'AutomaticLogin = {{ auto_user }}'
## sddm/KDE:
- name: enable auto login in sddm
when: sddm.stat.exists == true
template:
src: sddm.conf.j2
dest: /etc/sddm.conf
- name: kde global defaults
when: sddm.stat.exists == true
copy:
src: kde5rc
dest: /etc/kde5rc
- name: modify kde screen lock
when: sddm.stat.exists == true
copy:
src: kscreenlockerrc
dest: /etc/xdg/kscreenlockerrc
########
- name: graphics quirk
when: ansible_product_name == "HP 500" or ansible_product_name == "HP 550"
lineinfile:

View file

@ -0,0 +1,4 @@
[Autologin]
Relogin=true
Session=plasma.desktop
User={{ auto_user }}