This role will install KDE and set up a chromium kiosk site or several
The kiosk(s) are generated based on the variables. This is based on the kiosk I built for the road trip carputer pipeline, and here is an example of how to load two sites with this playbook. The reason for the presence of the user_data_dir variable is the need to create this folder. I now have ansible check if there are multiple objects in the variable and create the folder, but I still need the second variable for the task to create the folder because I don't want to parse the bigger variable.
For some reason there is a problem with multiple windows and Wayland, it seems to ignore the placement. When the playbooks is ran with X11 enabled, the placement of the windows is correct. When the playbook is configured with Wayland, all chrome windows are centered. There is a variable to force X11 that can be manually set. I also set this to just use Chromium; it was origninally a troubleshooting step, but since this is a Kiosk, Chromium is lovely. It could always be put back to Chrome with just a few tasks.
This role has two modes, and it matters which is used. It can be called from the Jenkins pipeline that uses a dynamic kiosk service file and just creates a chrome kiosk. It can be also called as another step in a bigger playbook using ansible variables. If I can figure out how to pass this ansible variable through jenkins another way I would, but since the variable contains newlines I'm not sure how to pass it through the shell command. Most of the time it will be used by another playbook, and the variables can be set in the role.
Example kiosk.yaml file:
kiosk_service_templates:
- chrome_website: "http://localhost:8081"
service_name: user_stream_control
service_description: "VCR Capture User Stream Control"
extra_service_configs: ""
user_data_dir: "/opt/chrome/one"
extra_chrome_configs: |
--window-size="560,1080" \
--user-data-dir=/opt/chrome/one \
- chrome_website: "http://localhost:8888/stream"
service_name: stream_preview
service_description: "VCR Capture Preview Stream"
extra_service_configs: ""
user_data_dir: "/opt/chrome/two"
extra_chrome_configs: |
--window-size="1350,1080" \
--user-data-dir=/opt/chrome/two \
--window-position="570,0" \