mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-12-22 18:35:03 +01:00
Refactored driver-msi-keyboard-color
This commit is contained in:
parent
992745ebf6
commit
71b76f2b35
@ -5,5 +5,29 @@
|
||||
name:
|
||||
- msi-perkeyrgb
|
||||
|
||||
- include_tasks: setup_script.yml
|
||||
- include_tasks: setup_timers.yml
|
||||
- name: Copy keyboard_color.sh script
|
||||
copy:
|
||||
src: keyboard_color.py
|
||||
dest: /opt/keyboard_color.py
|
||||
mode: 0755
|
||||
|
||||
- name: Copy keyboard-color.cymais.service file
|
||||
template:
|
||||
src: keyboard-color.service.j2
|
||||
dest: /etc/systemd/system/keyboard-color.cymais.service
|
||||
mode: 0644
|
||||
|
||||
- name: Reload systemd daemon
|
||||
systemd:
|
||||
daemon_reload: yes
|
||||
|
||||
- name: set service_name to the name of the current role
|
||||
set_fact:
|
||||
service_name: "{{ role_name }}"
|
||||
|
||||
- name: "include role for systemd-timer for {{service_name}}"
|
||||
include_role:
|
||||
name: systemd-timer
|
||||
vars:
|
||||
on_calendar: "{{on_calendar_msi_keyboard_color}}"
|
||||
persistent: "true"
|
||||
|
@ -1,8 +0,0 @@
|
||||
---
|
||||
- name: Copy keyboard_color.sh script
|
||||
copy:
|
||||
src: keyboard_color.py
|
||||
dest: /opt/keyboard_color.py
|
||||
mode: 0755
|
||||
tags:
|
||||
- keyboard-color
|
@ -1,30 +0,0 @@
|
||||
---
|
||||
- name: Copy keyboard-color.cymais.timer file
|
||||
template:
|
||||
src: keyboard-color.timer.j2
|
||||
dest: /etc/systemd/system/keyboard-color.cymais.timer
|
||||
mode: 0644
|
||||
tags:
|
||||
- keyboard-color
|
||||
|
||||
- name: Copy keyboard-color.cymais.service file
|
||||
template:
|
||||
src: keyboard-color.service.j2
|
||||
dest: /etc/systemd/system/keyboard-color.cymais.service
|
||||
mode: 0644
|
||||
tags:
|
||||
- keyboard-color
|
||||
|
||||
- name: Reload systemd daemon
|
||||
systemd:
|
||||
daemon_reload: yes
|
||||
tags:
|
||||
- keyboard-color
|
||||
|
||||
- name: Enable and start keyboard-color.cymais.timer
|
||||
systemd:
|
||||
name: keyboard-color.cymais.timer
|
||||
state: restarted
|
||||
enabled: yes
|
||||
tags:
|
||||
- keyboard-color
|
@ -1,9 +0,0 @@
|
||||
[Unit]
|
||||
Description=Keyboard Color Timer
|
||||
|
||||
[Timer]
|
||||
OnCalendar={{on_calendar_msi_keyboard_color}}
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
Loading…
Reference in New Issue
Block a user