Systemd timer template enable masked timers - #15079
Open
teacup-on-rockingchair wants to merge 3 commits into
Open
Systemd timer template enable masked timers#15079teacup-on-rockingchair wants to merge 3 commits into
teacup-on-rockingchair wants to merge 3 commits into
Conversation
teacup-on-rockingchair
requested review from
Mab879,
jan-cerny,
matusmarhefka and
vojtapolasek
as code owners
September 2, 2026 02:52
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The changes are minimal, consistent with existing systemd remediation patterns in the repo, and include a targeted test covering the masked-timer scenario.
Pull request overview
Updates the timer_enabled template so remediations correctly handle the case where the target systemd timer is masked, and adds a regression test to ensure a masked timer is detected as noncompliant and fixed by remediation.
Changes:
- Add
systemctl unmaskto the bash remediation before starting/enabling the timer. - Ensure the Ansible remediation explicitly unmasks the timer via
masked: "no". - Add a new failing test scenario that masks the timer (
timer_masked.fail.sh).
File summaries
| File | Description |
|---|---|
| shared/templates/timer_enabled/tests/timer_masked.fail.sh | Adds a failing test setup that stops and masks the timer to validate remediation handles masked units. |
| shared/templates/timer_enabled/bash.template | Unmasks the timer prior to start/enable to handle the masked-unit edge case. |
| shared/templates/timer_enabled/ansible.template | Adds masked: "no" to ensure the timer is unmasked when enabling/starting via Ansible. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Mab879
requested changes
Sep 2, 2026
Co-authored-by: Matthew Burket <m@tthewburket.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
Rationale: