mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
sys-ctl: make service file generation deterministic and simplify ignore logic
- Added '| sort' to all service group lists and backup routine lists to ensure deterministic ordering and stable checksums across Ansible runs. - Adjusted systemctl templates to use a single service variable ('SYS_SERVICE_BACKUP_RMT_2_LOC') instead of rejecting dynamic list entries, making the ignore logic simpler and more predictable. - Fixed minor whitespace inconsistencies in Jinja templates to avoid unnecessary changes. This change was made to prevent spurious 'changed' states in Ansible caused by non-deterministic list order and to reduce complexity in service definitions. See discussion: https://chatgpt.com/share/68a74c20-6300-800f-a44e-da43ae2f3dea
This commit is contained in:
@@ -4,5 +4,5 @@ OnFailure={{ SYS_SERVICE_ON_FAILURE_COMPOSE }}
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStartPre=/usr/bin/python {{ PATH_SYSTEM_LOCK_SCRIPT }} {{ SYS_SERVICE_GROUP_MANIPULATION | join(' ') }} --ignore {{ SYS_SERVICE_GROUP_CLEANUP| join(' ') }} --timeout "{{ SYS_TIMEOUT_BACKUP_SERVICES }}"
|
||||
ExecStartPre=/usr/bin/python {{ PATH_SYSTEM_LOCK_SCRIPT }} {{ SYS_SERVICE_GROUP_MANIPULATION | join(' ') }} --ignore {{ SYS_SERVICE_GROUP_CLEANUP | join(' ') }} --timeout "{{ SYS_TIMEOUT_BACKUP_SERVICES }}"
|
||||
ExecStart={{ system_service_script_exec }} {{ SIZE_PERCENT_CLEANUP_DISC_SPACE }}
|
Reference in New Issue
Block a user