initial commit, carputer ansible role

This commit is contained in:
2025-07-26 15:09:47 -07:00
commit b81872440f
17 changed files with 526 additions and 0 deletions

61
tasks/kiosk.yaml Normal file
View File

@ -0,0 +1,61 @@
---
###############################################
# Chrome Kiosk Config
# This creates the service and configures the user profile
###############################################
- name: lldp - apache - clear www
command: rm -R /var/www/html
# Copy Web Server Files
- name: lldp - apache - web - copy files
copy:
src: "{{ item }}"
dest: /var/www/html/
owner: www-data
mode: 0755
with_fileglob:
- "/var/jenkins_home/ansible/roles/lldp_scan/files/www/*"
- name: Chrome Kiosk - Create User Service Folder
file:
path: /home/cosmos/.config/systemd/user
state: directory
owner: cosmos
group: cosmos
mode: '0700'
- name: Chrome Kiosk - user stop service
command: systemctl --user -M cosmos@ stop chrome.service
register: user_start_chrome
ignore_errors: true
- name: Chrome Kiosk - Kill chrome if running otherwise
command: pkill chrome
ignore_errors: true
- name: Chrome Kiosk - Copy chrome service file
template:
src: chrome-app.service.j2
dest: /home/cosmos/.config/systemd/user/chrome.service
owner: cosmos
group: cosmos
mode: 0600
- name: Chrome Kiosk - user daemon reload
command: systemctl --user -M cosmos@ daemon-reload
register: user_daemon_reload
ignore_errors: true
- name: Chrome Kiosk - user enable service
command: systemctl --user -M cosmos@ enable chrome.service
register: user_enable_chrome
ignore_errors: true
- name: Chrome Kiosk - user start service
command: systemctl --user -M cosmos@ start chrome.service
register: user_start_chrome
ignore_errors: true
...