2022-11-12 15:54:28 +01:00
|
|
|
---
|
|
|
|
- hosts: hobbes.n39.eu
|
|
|
|
become: true
|
|
|
|
|
|
|
|
vars:
|
|
|
|
ansible_python_interpreter: /usr/bin/python3
|
|
|
|
|
|
|
|
|
|
|
|
roles:
|
|
|
|
|
|
|
|
tasks:
|
|
|
|
- name: Install packages needed for the system
|
|
|
|
# This is a list of all packages,
|
|
|
|
# unless they are installed by a specific role
|
|
|
|
ansible.builtin.apt:
|
|
|
|
state: present
|
|
|
|
name:
|
2024-01-04 01:25:38 +01:00
|
|
|
- mosquitto-clients
|
|
|
|
- fbi
|
|
|
|
|
2022-11-12 15:54:28 +01:00
|
|
|
|
|
|
|
- name: Remove the screensavers
|
|
|
|
ansible.builtin.apt:
|
|
|
|
state: absent
|
|
|
|
name:
|
|
|
|
- xscreensaver
|
|
|
|
|
|
|
|
|
|
|
|
- name: Set MAC address for proper DHCP recognition
|
|
|
|
# Uses mac variable from inventory
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: templates/network-interfaces-dhcp-mac.j2
|
|
|
|
dest: /etc/network/interfaces.d/hobbes-mac
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: '0644'
|
|
|
|
|
|
|
|
- name: Disable IPv6
|
|
|
|
# Because it is not working....
|
|
|
|
ansible.builtin.copy:
|
|
|
|
src: files/sysctl-no-ipv6.conf
|
|
|
|
dest: /etc/sysctl.d/99-systcl-no-ipv6.conf
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: '0644'
|
|
|
|
|
|
|
|
|
|
|
|
### Kiosk setup
|
|
|
|
- name: Ensure kiosk user is there
|
|
|
|
ansible.builtin.user:
|
|
|
|
name: "{{ kiosk_user }}"
|
|
|
|
groups: audio,plugdev,input,netdev
|
|
|
|
append: yes
|
|
|
|
|
2024-01-04 01:25:38 +01:00
|
|
|
- name: Install Kiosk script
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: templates/hobbes/kiosk.sh.j2
|
|
|
|
dest: /usr/local/bin/kiosk.sh
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: '0755'
|
|
|
|
|
|
|
|
- name: Add systemd service
|
|
|
|
ansible.builtin.copy:
|
|
|
|
src: files/hobbes/grafana-kiosk.service
|
|
|
|
dest: /etc/systemd/system/grafana-kiosk.service
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: '0644'
|
|
|
|
|
|
|
|
- name: Enable and start kiosk service
|
|
|
|
ansible.builtin.service:
|
|
|
|
name: grafana-kiosk.service
|
|
|
|
enabled: true
|
|
|
|
state: started
|
2022-11-12 15:54:28 +01:00
|
|
|
|
|
|
|
handlers:
|