ci: shared molecule config: no prerun reinstall, smart fact gathering #421

Open
opened 2026-11-27 13:34:14 +00:00 by Claude · 0 comments
Owner

Part of #419

Problem

Every scenario runs molecule's prerun, which reinstalls the collection and its dependencies per scenario (scripts/run_molecule_scenarios.sh line 4: "molecule reinstalls the collection there with --force"), although scenarios load mortis.kamino from the checkout (.gitea/workflows/AGENTS.md, the rule that puts galaxy.yml on IGNORED). Each play also gathers facts again with the default implicit gathering.

Out of scope: pipelining (separate issue, so a become failure is attributable).

Proposal

  • Add .config/molecule/config.yml, read by every scenario, with prerun: false and ANSIBLE_GATHERING: smart (through the provisioner's env or config options).
  • Add .config/ to build_ignore in galaxy.yml so it does not ship in the Collection tarball.
  • Reword the text that says molecule installs the collection per scenario: the comment in scripts/run_molecule_scenarios.sh and the rule in .gitea/workflows/AGENTS.md.
  • Do not add the new file to the selector's IGNORED list: every scenario reads it.

Acceptance criteria

  • A Molecule run's log shows no collection install step before a scenario (job log of the PR's Molecule check).
  • ansible-galaxy collection build output does not contain .config/ (tar tzf of the built tarball; the Build check).
  • python3 -m unittest discover -s tests/scripts passes.
  • The Molecule check passes on the full run the new file triggers.

Assisted-by: Claude Code

Part of #419 ### Problem Every scenario runs molecule's prerun, which reinstalls the collection and its dependencies per scenario (`scripts/run_molecule_scenarios.sh` line 4: "molecule reinstalls the collection there with --force"), although scenarios load `mortis.kamino` from the checkout (`.gitea/workflows/AGENTS.md`, the rule that puts `galaxy.yml` on IGNORED). Each play also gathers facts again with the default `implicit` gathering. Out of scope: pipelining (separate issue, so a become failure is attributable). ### Proposal - Add `.config/molecule/config.yml`, read by every scenario, with `prerun: false` and `ANSIBLE_GATHERING: smart` (through the provisioner's env or config options). - Add `.config/` to `build_ignore` in `galaxy.yml` so it does not ship in the Collection tarball. - Reword the text that says molecule installs the collection per scenario: the comment in `scripts/run_molecule_scenarios.sh` and the rule in `.gitea/workflows/AGENTS.md`. - Do not add the new file to the selector's IGNORED list: every scenario reads it. ### Acceptance criteria - [ ] A Molecule run's log shows no collection install step before a scenario (job log of the PR's Molecule check). - [ ] `ansible-galaxy collection build` output does not contain `.config/` (`tar tzf` of the built tarball; the Build check). - [ ] `python3 -m unittest discover -s tests/scripts` passes. - [ ] The Molecule check passes on the full run the new file triggers. Assisted-by: Claude Code
Claude added the Kind/Enhancement
Status
Needs Triage
labels 2026-11-27 13:34:14 +00:00
Claude added a new dependency 2026-11-27 13:35:04 +00:00
Defame1297 added this to the CI velocity (emergency) milestone 2026-11-27 14:16:12 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: Mortis/Kamino#421