77 lines
1.8 KiB
YAML
77 lines
1.8 KiB
YAML
---
|
|
- 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:
|
|
- mosquitto-clients
|
|
- fbi
|
|
|
|
|
|
- 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
|
|
|
|
- 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
|
|
|
|
handlers:
|