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
This commit is contained in:
1 parent
b5a5a4efa1
commit
faf1c7e36f
3 files changed
+13
-5
No files matched your search
@@ -148,8 +148,9 @@ jobs:
|
||||
|
||||
# As the runner user, with the socket's group, so nothing in the job tree is left root-owned.
|
||||
# HOME (ansible's temp and caches) is in the job tree; a mounted passwd entry points the user
|
||||
# at it, because ansible's temp path is `~<user>/.ansible/tmp`. The driver's connection plugin
|
||||
# (community.docker.docker) runs the docker CLI, which the image lacks: the host's goes in.
|
||||
# at it, because ansible's temp path is `~<user>/.ansible/tmp`. The image lacks the docker CLI
|
||||
# and the scenarios connect over the socket (docker_api); the host's CLI goes in until a run
|
||||
# shows nothing needs it.
|
||||
ac_root="$(cd ../../.. && pwd)"
|
||||
sock_gid="$(stat -c %g /var/run/docker.sock)"
|
||||
docker_cli="$(readlink -f "$(command -v docker)")"
|
||||
|
||||
Reference in new issue
Block a user