ci: turn on Ansible pipelining for Molecule scenarios #446

Merged
Defame1297 merged 2 commits from ci/molecule-pipelining into main 2026-11-27 18:07:36 +00:00
Owner

What and why

Closes #423

Stacked on #444 (shared Molecule base config): this branch contains #444's commit plus one more. Merge #444 first; this pull request's own diff is then the last commit only.

Turns on Ansible pipelining in .config/molecule/config.yml (provisioner.config_options.connection.pipelining: true, next to defaults.gathering: smart). Without it, every remote task over the community.docker.docker connection pays extra docker exec/docker cp calls to make a temp dir, copy the module in and clean up; with it, the module is piped over stdin. Kept separate from #444 so a failure caused by pipelining (for example with sudo-rs on 26.04) is easy to attribute. The change touches a file outside roles/, so this pull request runs every scenario.

Verified

  • community.docker connection (5.4.0 read; 5.4.1 pinned) declares has_pipelining = True and runs docker exec -i; it has no pipelining option of its own, so ansible-core 2.22's is_pipelining_enabled falls back to the global setting, which [connection] pipelining sets.
  • No role or molecule image sets requiretty or writes sudoers rules; the 2604 image only adds pam_rootok to /etc/pam.d/sudo. Scenarios connect as root, so every become (pihole's become_user included) is root to root.
  • molecule 26.11.0 loading the sshd scenario with the shared base config gives provisioner.config_options with both connection.pipelining: true and defaults.gathering: smart.
  • pre-commit run --files .config/molecule/config.yml, the commit hooks and ansible-test sanity (pre-push) pass.

Not verified

  • No scenario was run locally (Molecule runs only in CI); this pull request's Molecule run is the test.
  • Ubuntu 26.04 defaults /usr/bin/sudo to sudo-rs; which implementation the 2604 image's sudo package installs, and whether sudo-rs passes stdin through under pipelining, were not confirmed outside CI.
  • The 5.4.1 connection plugin itself (5.4.0 was read).
  • The time saved per task.

  • I confirm third-party material is recorded in NOTICE and REUSE.toml, or there is none.

Assisted-by: Claude Code

## What and why Closes #423 **Stacked on #444** (shared Molecule base config): this branch contains #444's commit plus one more. Merge #444 first; this pull request's own diff is then the last commit only. Turns on Ansible pipelining in `.config/molecule/config.yml` (`provisioner.config_options.connection.pipelining: true`, next to `defaults.gathering: smart`). Without it, every remote task over the `community.docker.docker` connection pays extra `docker exec`/`docker cp` calls to make a temp dir, copy the module in and clean up; with it, the module is piped over stdin. Kept separate from #444 so a failure caused by pipelining (for example with sudo-rs on 26.04) is easy to attribute. The change touches a file outside `roles/`, so this pull request runs every scenario. ## Verified - `community.docker` connection (5.4.0 read; 5.4.1 pinned) declares `has_pipelining = True` and runs `docker exec -i`; it has no `pipelining` option of its own, so ansible-core 2.22's `is_pipelining_enabled` falls back to the global setting, which `[connection] pipelining` sets. - No role or molecule image sets `requiretty` or writes sudoers rules; the 2604 image only adds `pam_rootok` to `/etc/pam.d/sudo`. Scenarios connect as root, so every `become` (pihole's `become_user` included) is root to root. - molecule 26.11.0 loading the sshd scenario with the shared base config gives `provisioner.config_options` with both `connection.pipelining: true` and `defaults.gathering: smart`. - `pre-commit run --files .config/molecule/config.yml`, the commit hooks and `ansible-test sanity` (pre-push) pass. ## Not verified - No scenario was run locally (Molecule runs only in CI); this pull request's Molecule run is the test. - Ubuntu 26.04 defaults `/usr/bin/sudo` to sudo-rs; which implementation the 2604 image's `sudo` package installs, and whether sudo-rs passes stdin through under pipelining, were not confirmed outside CI. - The 5.4.1 connection plugin itself (5.4.0 was read). - The time saved per task. --- - [x] I confirm third-party material is recorded in `NOTICE` and `REUSE.toml`, or there is none. Assisted-by: Claude Code
Claude added 2 commits 2026-11-27 15:47:11 +00:00
ci: share a Molecule base config with prerun off and smart gathering
Build / build (pull_request) Successful in 50s
Lint / lint (pull_request) Successful in 5m11s
Molecule / molecule (pull_request) Canceled after 16m59s
7d11d23294
Add .config/molecule/config.yml, which molecule merges under every
scenario's molecule.yml. prerun is off: the CI wrapper already puts the
checkout first on ANSIBLE_COLLECTIONS_PATH, so molecule's per-scenario
reinstall of mortis.kamino into ANSIBLE_HOME is redundant. gathering is
smart, so each host's facts are gathered once per playbook run instead
of in every play.

Add .config to build_ignore so scripts/check_tarball.py does not fail
the build, and reword the Molecule rule and the two script comments that
said molecule installs the collection into each scenario's ANSIBLE_HOME.

Assisted-by: Claude Code:claude-opus-5-5
ci: turn on Ansible pipelining for Molecule scenarios
Molecule / molecule (pull_request) Canceled after 0s
Build / build (pull_request) Canceled after 7s
Lint / lint (pull_request) Canceled after 7s
380d52cd13
Set connection.pipelining in the shared Molecule base config. Without
it, every remote task over the community.docker.docker connection pays
extra docker exec and docker cp calls to create a temp dir, copy the
module in and clean up; with it, the module goes over stdin.

The docker connection declares has_pipelining and has no pipelining
option of its own, so core's global setting applies. No role or image
sets requiretty.

Closes #423

Assisted-by: Claude Code:claude-opus-5-5
CODEOWNERS rules requested review from Defame1297 2026-11-27 15:47:11 +00:00
Defame1297 added 1 commit 2026-11-27 17:29:18 +00:00
Merge branch 'main' into ci/molecule-pipelining
Build / build (pull_request) Successful in 34s
Lint / lint (pull_request) Successful in 2m58s
Molecule / molecule (pull_request) Successful in 37m27s
34990718f0
Defame1297 scheduled this pull request to auto merge when all checks succeed 2026-11-27 17:32:05 +00:00
Defame1297 approved these changes 2026-11-27 17:32:14 +00:00
Defame1297 merged commit b3037273b7 into main 2026-11-27 18:07:36 +00:00
Defame1297 deleted branch ci/molecule-pipelining 2026-11-27 18:07:47 +00:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mortis/Kamino#446