mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-30 15:28:12 +02:00
Renamed general and mode constants and implemented a check to verify that constants are just defined ones over the whole repository
This commit is contained in:
@@ -9,7 +9,7 @@ This role configures a systemd timer to periodically start a corresponding servi
|
||||
Optimized for automated task scheduling in a [systemd](https://en.wikipedia.org/wiki/Systemd) environment, this role:
|
||||
- Generates a timer unit file for a given service (using the `service_name` variable).
|
||||
- Reloads and restarts the timer using systemd to ensure that changes take effect.
|
||||
- Supports dynamic configuration of scheduling parameters via variables like `on_calendar` and `randomized_delay_sec`.
|
||||
- Supports dynamic configuration of scheduling parameters via variables like `on_calendar` and `RANDOMIZED_DELAY_SEC`.
|
||||
|
||||
## Purpose
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
|
||||
- name: "reset (if enabled)"
|
||||
include_tasks: 01_reset.yml
|
||||
when: mode_reset | bool and run_once_sys_timer is not defined
|
||||
when: MODE_RESET | bool and run_once_sys_timer is not defined
|
||||
|
||||
- name: run {{ role_name }} once
|
||||
set_fact:
|
||||
@@ -20,5 +20,5 @@
|
||||
name: "{{ sys_timer_file }}"
|
||||
state: restarted
|
||||
enabled: yes
|
||||
when: dummy_timer.changed or activate_all_timers | bool
|
||||
when: dummy_timer.changed or ACTIVATE_ALL_TIMERS | bool
|
||||
|
||||
|
@@ -3,7 +3,7 @@ Description=Timer to start {{service_name}}.infinito.service
|
||||
|
||||
[Timer]
|
||||
OnCalendar={{on_calendar}}
|
||||
RandomizedDelaySec={{randomized_delay_sec}}
|
||||
RandomizedDelaySec={{RANDOMIZED_DELAY_SEC}}
|
||||
Persistent={{ persistent | default('false') }}
|
||||
|
||||
[Install]
|
||||
|
Reference in New Issue
Block a user