You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
87 lines
1.9 KiB
YAML
87 lines
1.9 KiB
YAML
---
|
|
|
|
- name: Install packages for Web UI
|
|
apt:
|
|
state: present
|
|
name:
|
|
# main packages
|
|
- chromium # Webbrowser
|
|
- i3 # Window Manager
|
|
- lightdm # Login Manager with Autologin
|
|
# tools
|
|
- xdotool # simulate keyboard inputs on X11
|
|
|
|
- name: Create autologin group for LightDM
|
|
group:
|
|
state: present
|
|
name: autologin
|
|
|
|
- name: Configure kiosk user
|
|
user:
|
|
state: present
|
|
name: "{{ kiosk_user }}"
|
|
home: "{{ kiosk_user_directory }}"
|
|
create_home: yes
|
|
move_home: yes
|
|
shell: /usr/bin/bash
|
|
groups:
|
|
- audio
|
|
- autologin
|
|
- video
|
|
append: yes
|
|
password: "{{ kiosk_user_pass | password_hash('sha512', LOCAL_SALT) }}"
|
|
update_password: on_create
|
|
|
|
- name: Configure lightdm
|
|
template:
|
|
src: "{{ item }}"
|
|
dest: "{{ global_lightdm_configuration_directory }}/{{ item }}"
|
|
owner: root
|
|
group: root
|
|
mode: u=rw,g=r,o=r
|
|
loop:
|
|
- lightdm.conf
|
|
- lightdm-gtk-greeter.conf
|
|
|
|
- name: Store autostart script
|
|
template:
|
|
src: autostart.sh
|
|
dest: "{{ autostart_script }}"
|
|
owner: root
|
|
group: root
|
|
mode: u=rwx,g=rx,o=rx
|
|
|
|
- name: Create configuration directories for kiosk user
|
|
file:
|
|
state: directory
|
|
path: "{{ kiosk_user_directory }}/{{ item }}"
|
|
owner: root
|
|
group: "{{ kiosk_user }}"
|
|
mode: u=rwx,g=rx,o=
|
|
loop:
|
|
- .config/i3
|
|
|
|
- name: Configure i3 for kiosk user
|
|
template:
|
|
src: "i3.cfg"
|
|
dest: "{{ kiosk_user_directory }}/.config/i3/config"
|
|
owner: root
|
|
group: "{{ kiosk_user }}"
|
|
mode: u=rw,g=r,o=
|
|
|
|
- name: Create policy directory for chromium globally
|
|
file:
|
|
state: directory
|
|
path: "{{ global_chromium_managed_policies_file | dirname }}"
|
|
owner: root
|
|
group: root
|
|
mode: u=rwx,g=rx,o=rx
|
|
|
|
- name: Configure policies for chromium globally
|
|
copy:
|
|
content: "{{ chromium_policies | to_nice_json }}"
|
|
dest: "{{ chromium_policies_file }}"
|
|
owner: root
|
|
group: root
|
|
mode: u=rw,g=r,o=r
|