Add KDE plasma as another kiosk system option.
This commit is contained in:
parent
fef999e7fe
commit
b3b8d3d342
8 changed files with 72 additions and 4 deletions
|
@ -9,7 +9,7 @@
|
||||||
## This interface provides the default route:
|
## This interface provides the default route:
|
||||||
if_wan: "{{ ansible_default_ipv4.interface }}"
|
if_wan: "{{ ansible_default_ipv4.interface }}"
|
||||||
## Use the first remaining interface for the LAN:
|
## 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:
|
## Add 'hostname=XXX' to the installer boot parameters if necessary:
|
||||||
hostname: "{{ ansible_hostname }}"
|
hostname: "{{ ansible_hostname }}"
|
||||||
ipaddr_lan: 192.168.0.10
|
ipaddr_lan: 192.168.0.10
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
- name: validate if interfaces are available
|
- name: validate if interfaces are available
|
||||||
fail:
|
fail:
|
||||||
msg: "Interfaces {{ ansible_interfaces }} found. WAN: '{{ if_wan }}', LAN: '{{ if_lan }}'. Two NICs needed."
|
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:
|
roles:
|
||||||
- up2date-debian
|
- up2date-debian
|
||||||
|
|
|
@ -17,5 +17,7 @@
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
- up2date-debian
|
- up2date-debian
|
||||||
|
## Choose either gnome or KDE:
|
||||||
- gnome
|
- gnome
|
||||||
|
#- kde
|
||||||
- kiosk
|
- kiosk
|
||||||
|
|
3
roles/kde/handlers/main.yml
Normal file
3
roles/kde/handlers/main.yml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
- name: update grub
|
||||||
|
command: update-grub
|
||||||
|
listen: update grub
|
21
roles/kde/tasks/main.yml
Normal file
21
roles/kde/tasks/main.yml
Normal 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
8
roles/kiosk/files/kde5rc
Normal 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
|
3
roles/kiosk/files/kscreenlockerrc
Normal file
3
roles/kiosk/files/kscreenlockerrc
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
[Daemon][$i]
|
||||||
|
Autolock=false
|
||||||
|
LockOnResume=false
|
|
@ -12,24 +12,51 @@
|
||||||
apt: name={{ extra_pkgs_bpo }} state=latest default_release={{ deb_release }}-backports
|
apt: name={{ extra_pkgs_bpo }} state=latest default_release={{ deb_release }}-backports
|
||||||
when: extra_pkgs_bpo|length
|
when: extra_pkgs_bpo|length
|
||||||
|
|
||||||
|
## Check which display manager is used:
|
||||||
- name: check if gdm3 is installed
|
- name: check if gdm3 is installed
|
||||||
stat: path=/etc/gdm3/daemon.conf
|
stat: path=/etc/gdm3/daemon.conf
|
||||||
register: gdm3
|
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
|
when: gdm3.stat.exists == true
|
||||||
lineinfile:
|
lineinfile:
|
||||||
dest: /etc/gdm3/daemon.conf
|
dest: /etc/gdm3/daemon.conf
|
||||||
insertafter: '^#\s*AutomaticLoginEnable = true'
|
insertafter: '^#\s*AutomaticLoginEnable = true'
|
||||||
line: 'AutomaticLoginEnable = true'
|
line: 'AutomaticLoginEnable = true'
|
||||||
|
|
||||||
- name: auto login user
|
- name: auto login user in gdm3
|
||||||
when: gdm3.stat.exists == true
|
when: gdm3.stat.exists == true
|
||||||
lineinfile:
|
lineinfile:
|
||||||
dest: /etc/gdm3/daemon.conf
|
dest: /etc/gdm3/daemon.conf
|
||||||
insertafter: '^#\s*AutomaticLogin = '
|
insertafter: '^#\s*AutomaticLogin = '
|
||||||
line: 'AutomaticLogin = {{ auto_user }}'
|
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
|
- name: graphics quirk
|
||||||
when: ansible_product_name == "HP 500" or ansible_product_name == "HP 550"
|
when: ansible_product_name == "HP 500" or ansible_product_name == "HP 550"
|
||||||
lineinfile:
|
lineinfile:
|
||||||
|
|
4
roles/kiosk/templates/sddm.conf.j2
Normal file
4
roles/kiosk/templates/sddm.conf.j2
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
[Autologin]
|
||||||
|
Relogin=true
|
||||||
|
Session=plasma.desktop
|
||||||
|
User={{ auto_user }}
|
Loading…
Add table
Reference in a new issue