Files
Kamino/.config/molecule/config.yml
T
Defame1297 faf1c7e36f ci(molecule): connect over the Docker API with a fixed Python interpreter
The docker driver's community.docker.docker connection starts the docker CLI for every task
on every host, and each playbook run discovers the interpreter on every container although
both molecule images ship /usr/bin/python3. The shared base config now sets
provisioner.connection_options, which molecule merges over the driver's own connection vars
for the container hosts only, so localhost keeps the controller's Python.

community.docker 5.4.1's docker_api connection supports pipelining and become and needs only
requests, which requirements-dev.lock already pins. The docker CLI bind mount in molecule.yml
stays until a green run shows nothing needs it; its comment and two others that named the
CLI's calls now describe the API connection.

Closes #455

Assisted-by: Claude Code
2026-11-28 15:51:17 +00:00

27 lines
1.3 KiB
YAML

---
# Merged under every scenario's molecule.yml. prerun off: the CI wrapper puts this checkout
# first on ANSIBLE_COLLECTIONS_PATH, so molecule's per-scenario install is unused.
prerun: false
provisioner:
# Merged over the docker driver's own connection vars, for the container hosts only: localhost
# keeps the controller's connection and Python.
connection_options:
# Talk to the daemon over its socket, instead of starting the docker CLI for every task.
ansible_connection: community.docker.docker_api
# Both molecule images ship it; a fixed path skips interpreter discovery in every playbook run.
ansible_python_interpreter: /usr/bin/python3
config_options:
connection:
# Pipe each module over stdin: without it every task pays extra exec and copy calls to the
# daemon to make a temp dir, copy the module in and clean up.
pipelining: true
defaults:
# Gather each host's facts once per playbook run, not in every play.
gathering: smart
# Per-task timings, to see what a scenario's time goes to; ansible.posix is in the ci image
# and in requirements.yml, so the controller always has these callbacks.
callbacks_enabled: ansible.posix.profile_tasks, ansible.posix.timer
callback_profile_tasks:
summary_only: true
task_output_limit: 20