predavalnice-kontroler/touch_display/touch_display.yml

32 lines
893 B
YAML

- name: Download .deb file
get_url:
url: "https://github.com/leukipp/touchkio/releases/download/v{{ touchkio_version }}/touchkio_{{ touchkio_version }}_arm64.deb"
dest: "/tmp/touchkio_{{ touchkio_version }}_arm64.deb"
register: deb_download
- name: Install the latest .deb package
become: yes
apt:
deb: "/tmp/touchkio_{{ touchkio_version }}_arm64.deb"
when: deb_download is succeeded
- name: Create systemd user service directory
file:
path: "{{ ansible_env.HOME }}/.config/systemd/user"
state: directory
- name: Create systemd user service
template:
src: touchkio.service.j2
dest: "{{ ansible_env.HOME }}/.config/systemd/user/touchkio.service"
- name: Enable systemd service
ansible.builtin.systemd_service:
name: touchkio
enabled: true
state: restarted
scope: user
daemon_reload: true
when: ansible_check_mode == false