A scheduled dry run (--check) of a play that includes system_baseline reported every host as changed whenever a package was waiting for the next patch run, or the apt cache was older than an hour, because the package module reports both as changed in check mode. In the main flow the role now skips the apt upgrade in check mode. Autoremove and autoclean are a task of their own and stay checked, so a leftover package still shows as drift.
The tasks_from: update entry point is a supported interface (its behaviour follows semver), so it is left as it was: it still previews the upgrade in check mode. Only tasks/main.yml sets the internal __system_baseline_main_flow that makes the skip apply.
Behaviour changes
In the main flow, check mode no longer previews the upgrade (the issue's proposal). If you would rather keep the preview available, a variable instead of the hard skip is an easy change; the issue asks that and has no answer yet.
apt-get autoclean now runs. In the old single call the module ran the upgrade first and did not reach autoclean (read from the apt module source), so splitting the task makes autoclean run for the first time, in the main flow and in the update entry point. A host with stale archives reports changed once for it.
Verified
The condition and the variable passing, with Ansible's own engine and the real update.yml (package module stubbed): in a real run both tasks run in the main flow and in the entry point; in --check the main flow skips only the upgrade, and the entry point still runs it. system_baseline_update: false and --skip-tags update still skip both tasks.
An independent review of the diff, no blocking finding; its wording findings are applied.
Not verified
Molecule: the scenario skips the update tag (no privileged container), so neither task runs in CI and this change has no automated coverage.
A real apt host: I did not run the split tasks against one, so the idempotence of the cleanup task (changed only when apt reports Del or packages to remove) is read from the module, not observed.
I confirm third-party material is recorded in NOTICE and REUSE.toml, or there is none.
Assisted-by: Claude Code
## What and why
Closes #321
A scheduled dry run (`--check`) of a play that includes `system_baseline` reported every host as changed whenever a package was waiting for the next patch run, or the apt cache was older than an hour, because the package module reports both as `changed` in check mode. In the main flow the role now skips the apt upgrade in check mode. Autoremove and autoclean are a task of their own and stay checked, so a leftover package still shows as drift.
The `tasks_from: update` entry point is a supported interface (its behaviour follows semver), so it is left as it was: it still previews the upgrade in check mode. Only `tasks/main.yml` sets the internal `__system_baseline_main_flow` that makes the skip apply.
**Behaviour changes**
- In the main flow, check mode no longer previews the upgrade (the issue's proposal). If you would rather keep the preview available, a variable instead of the hard skip is an easy change; the issue asks that and has no answer yet.
- `apt-get autoclean` now runs. In the old single call the module ran the upgrade first and did not reach autoclean (read from the apt module source), so splitting the task makes autoclean run for the first time, in the main flow and in the `update` entry point. A host with stale archives reports `changed` once for it.
## Verified
- The condition and the variable passing, with Ansible's own engine and the real `update.yml` (package module stubbed): in a real run both tasks run in the main flow and in the entry point; in `--check` the main flow skips only the upgrade, and the entry point still runs it. `system_baseline_update: false` and `--skip-tags update` still skip both tasks.
- All commit-stage hooks pass (yamllint, ansible-lint, REUSE, changelog lint, Conventional Commit).
- An independent review of the diff, no blocking finding; its wording findings are applied.
## Not verified
- Molecule: the scenario skips the `update` tag (no privileged container), so neither task runs in CI and this change has no automated coverage.
- A real apt host: I did not run the split tasks against one, so the idempotence of the cleanup task (changed only when apt reports `Del ` or packages to remove) is read from the module, not observed.
---
- [x] I confirm third-party material is recorded in `NOTICE` and `REUSE.toml`, or there is none.
Assisted-by: Claude Code
The main flow skips the apt upgrade in check mode; autoremove and
autoclean are a task of their own and stay checked. The update entry
point is unchanged and still previews the upgrade.
Assisted-by: Claude Code
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
Closes #321
A scheduled dry run (
--check) of a play that includessystem_baselinereported every host as changed whenever a package was waiting for the next patch run, or the apt cache was older than an hour, because the package module reports both aschangedin check mode. In the main flow the role now skips the apt upgrade in check mode. Autoremove and autoclean are a task of their own and stay checked, so a leftover package still shows as drift.The
tasks_from: updateentry point is a supported interface (its behaviour follows semver), so it is left as it was: it still previews the upgrade in check mode. Onlytasks/main.ymlsets the internal__system_baseline_main_flowthat makes the skip apply.Behaviour changes
apt-get autocleannow runs. In the old single call the module ran the upgrade first and did not reach autoclean (read from the apt module source), so splitting the task makes autoclean run for the first time, in the main flow and in theupdateentry point. A host with stale archives reportschangedonce for it.Verified
update.yml(package module stubbed): in a real run both tasks run in the main flow and in the entry point; in--checkthe main flow skips only the upgrade, and the entry point still runs it.system_baseline_update: falseand--skip-tags updatestill skip both tasks.Not verified
updatetag (no privileged container), so neither task runs in CI and this change has no automated coverage.Delor packages to remove) is read from the module, not observed.NOTICEandREUSE.toml, or there is none.Assisted-by: Claude Code