Two small system_baseline inputs, requested in #336 and #337.
system_baseline_reboot_throttle and system_baseline_reboot_post_delay (whole numbers, default 0) are passed to the throttle and post_reboot_delay of the reboot task, so a caller can reboot one host at a time and wait before the next. The main flow and tasks_from: reboot read them. A negative or non-integer value stops the run before a host reboots, in both (a shared validate_reboot.yml, because the entry point does not run validate.yml).
system_baseline_apt_daily_timeout (string, default empty) writes /etc/systemd/system/apt-daily.service.d/10-timeout.conf with TimeoutStartSec=<value> and reloads systemd when it changed. Empty leaves the host alone. Only apt-daily.service changes. Tag apt-daily-timeout. The value is checked to be one line starting with a digit (or infinity), so it cannot add a second directive to the unit file.
The defaults keep today's behaviour. Also changed: argument_specs, the README (variable table, entry point, two sections), one minor_changes fragment.
yamllint and ansible-lint (production profile) pass; the commit hooks pass.
Locally on ansible-core 2.22: a throttle of -1 and a timeout with a line break are refused with a message that names the variable, in the main flow and in the reboot entry point; valid values, including a templated throttle:, pass.
Molecule (CI): the converge sets 1h; verify reads the drop-in and checks that systemd reports LoadState=loaded and TimeoutStartUSec=1h; the refusals above are asserted.
Not verified
A real reboot with a throttle: CI cannot reboot its container, and the reboot task is tagged update, which the scenario skips. Only the validation is tested.
throttle templating on every supported ansible-core release; I ran 2.22 only.
apt-daily.service is assumed to exist in the Molecule image; if it does not, the LoadState=loaded check fails and needs a stub unit.
A value systemd cannot parse (such as 1xyz) passes the role's check; systemd ignores it and logs it. 0 is accepted and means no timeout (documented).
No third-party code or copied text is included.
Assisted-by: Claude Code
## What and why
Two small `system_baseline` inputs, requested in #336 and #337.
- `system_baseline_reboot_throttle` and `system_baseline_reboot_post_delay` (whole numbers, default `0`) are passed to the `throttle` and `post_reboot_delay` of the reboot task, so a caller can reboot one host at a time and wait before the next. The main flow and `tasks_from: reboot` read them. A negative or non-integer value stops the run before a host reboots, in both (a shared `validate_reboot.yml`, because the entry point does not run `validate.yml`).
- `system_baseline_apt_daily_timeout` (string, default empty) writes `/etc/systemd/system/apt-daily.service.d/10-timeout.conf` with `TimeoutStartSec=<value>` and reloads systemd when it changed. Empty leaves the host alone. Only `apt-daily.service` changes. Tag `apt-daily-timeout`. The value is checked to be one line starting with a digit (or `infinity`), so it cannot add a second directive to the unit file.
The defaults keep today's behaviour. Also changed: `argument_specs`, the README (variable table, entry point, two sections), one `minor_changes` fragment.
Closes #336
Closes #337
## Verified
- `yamllint` and `ansible-lint` (production profile) pass; the commit hooks pass.
- Locally on ansible-core 2.22: a throttle of `-1` and a timeout with a line break are refused with a message that names the variable, in the main flow and in the reboot entry point; valid values, including a templated `throttle:`, pass.
- Molecule (CI): the converge sets `1h`; verify reads the drop-in and checks that systemd reports `LoadState=loaded` and `TimeoutStartUSec=1h`; the refusals above are asserted.
## Not verified
- A real reboot with a throttle: CI cannot reboot its container, and the reboot task is tagged `update`, which the scenario skips. Only the validation is tested.
- `throttle` templating on every supported ansible-core release; I ran 2.22 only.
- `apt-daily.service` is assumed to exist in the Molecule image; if it does not, the `LoadState=loaded` check fails and needs a stub unit.
- A value systemd cannot parse (such as `1xyz`) passes the role's check; systemd ignores it and logs it. `0` is accepted and means no timeout (documented).
- [ ] No third-party code or copied text is included.
Assisted-by: Claude Code
Add system_baseline_reboot_throttle and system_baseline_reboot_post_delay, passed to
the throttle and post_reboot_delay of the reboot task, read by the main flow and by
tasks_from: reboot, both defaulting to 0 (today's behaviour) and validated in both.
Add system_baseline_apt_daily_timeout: when set, write a TimeoutStartSec drop-in for
apt-daily.service and reload systemd. Empty by default, which leaves the host alone.
Closes#336Closes#337
Assisted-by: Claude Code
Dragonish
scheduled this pull request to auto merge when all checks succeed 2026-11-23 21:08:52 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What and why
Two small
system_baselineinputs, requested in #336 and #337.system_baseline_reboot_throttleandsystem_baseline_reboot_post_delay(whole numbers, default0) are passed to thethrottleandpost_reboot_delayof the reboot task, so a caller can reboot one host at a time and wait before the next. The main flow andtasks_from: rebootread them. A negative or non-integer value stops the run before a host reboots, in both (a sharedvalidate_reboot.yml, because the entry point does not runvalidate.yml).system_baseline_apt_daily_timeout(string, default empty) writes/etc/systemd/system/apt-daily.service.d/10-timeout.confwithTimeoutStartSec=<value>and reloads systemd when it changed. Empty leaves the host alone. Onlyapt-daily.servicechanges. Tagapt-daily-timeout. The value is checked to be one line starting with a digit (orinfinity), so it cannot add a second directive to the unit file.The defaults keep today's behaviour. Also changed:
argument_specs, the README (variable table, entry point, two sections), oneminor_changesfragment.Closes #336
Closes #337
Verified
yamllintandansible-lint(production profile) pass; the commit hooks pass.-1and a timeout with a line break are refused with a message that names the variable, in the main flow and in the reboot entry point; valid values, including a templatedthrottle:, pass.1h; verify reads the drop-in and checks that systemd reportsLoadState=loadedandTimeoutStartUSec=1h; the refusals above are asserted.Not verified
A real reboot with a throttle: CI cannot reboot its container, and the reboot task is tagged
update, which the scenario skips. Only the validation is tested.throttletemplating on every supported ansible-core release; I ran 2.22 only.apt-daily.serviceis assumed to exist in the Molecule image; if it does not, theLoadState=loadedcheck fails and needs a stub unit.A value systemd cannot parse (such as
1xyz) passes the role's check; systemd ignores it and logs it.0is accepted and means no timeout (documented).No third-party code or copied text is included.
Assisted-by: Claude Code