Ansible but more better
This commit is contained in:
parent
29b2beca5a
commit
b7ce9d850d
13 changed files with 172 additions and 0 deletions
38
ansible_deploy/display/touch_display.yml
Normal file
38
ansible_deploy/display/touch_display.yml
Normal file
|
@ -0,0 +1,38 @@
|
|||
- name: Fix fonts
|
||||
become: true
|
||||
apt:
|
||||
name:
|
||||
- fonts-noto-core
|
||||
state: present
|
||||
|
||||
- name: Download .deb file
|
||||
get_url:
|
||||
url: "https://github.com/leukipp/touchkio/releases/download/v{{ touchkio_version }}/touchkio_{{ touchkio_version }}_arm64.deb"
|
||||
dest: "/home/pi/touchkio_{{ touchkio_version }}_arm64.deb"
|
||||
register: deb_download
|
||||
|
||||
- name: Install the latest .deb package
|
||||
become: yes
|
||||
apt:
|
||||
deb: "/home/pi/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
|
Loading…
Add table
Add a link
Reference in a new issue