Make EE tests work.

This commit is contained in:
Felix Fontein 2025-07-25 20:55:02 +02:00
parent c75310bad4
commit fa12fa1492
2 changed files with 13 additions and 1 deletions

View File

@ -82,8 +82,13 @@ config.dependencies.python_interpreter.package_system = "python3.11 python3.11-p
config.dependencies.python_interpreter.python_path = "/usr/bin/python3.11"
runtime_environment = {"ANSIBLE_PRIVATE_ROLE_VARS" = "true"}
runtime_container_options = [
# Mount Docker socket into the container so we can talk to Docker outside the container
"-v",
"/var/run/docker.sock:/var/run/docker.sock",
# Need to be root so we can access /var/run/docker.sock, which usually isn't accessible by the user,
# but only by the group the user is in (but that group membership isn't there in the container)
"--user",
"0",
]
[[sessions.ee_check.execution_environments]]
@ -95,6 +100,11 @@ config.dependencies.ansible_core.package_pip = "https://github.com/ansible/ansib
config.dependencies.ansible_runner.package_pip = "ansible-runner"
runtime_environment = {"ANSIBLE_PRIVATE_ROLE_VARS" = "true"}
runtime_container_options = [
# Mount Docker socket into the container so we can talk to Docker outside the container
"-v",
"/var/run/docker.sock:/var/run/docker.sock",
# Need to be root so we can access /var/run/docker.sock, which usually isn't accessible by the user,
# but only by the group the user is in (but that group membership isn't there in the container)
"--user",
"0",
]

View File

@ -15,11 +15,13 @@
- name: Read some files
slurp:
src: "{{ item }}"
src: "{{ path }}"
loop:
- /proc/self/cpuset
- /proc/1/cgroup
- /proc/1/environ
loop_control:
loop_var: path
- name: Print facts returned by module
debug: