mirror of
https://github.com/ansible-collections/community.docker.git
synced 2026-04-16 17:26:28 +00:00
Make EE tests work.
This commit is contained in:
parent
c75310bad4
commit
fa12fa1492
@ -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"
|
config.dependencies.python_interpreter.python_path = "/usr/bin/python3.11"
|
||||||
runtime_environment = {"ANSIBLE_PRIVATE_ROLE_VARS" = "true"}
|
runtime_environment = {"ANSIBLE_PRIVATE_ROLE_VARS" = "true"}
|
||||||
runtime_container_options = [
|
runtime_container_options = [
|
||||||
|
# Mount Docker socket into the container so we can talk to Docker outside the container
|
||||||
"-v",
|
"-v",
|
||||||
"/var/run/docker.sock:/var/run/docker.sock",
|
"/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]]
|
[[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"
|
config.dependencies.ansible_runner.package_pip = "ansible-runner"
|
||||||
runtime_environment = {"ANSIBLE_PRIVATE_ROLE_VARS" = "true"}
|
runtime_environment = {"ANSIBLE_PRIVATE_ROLE_VARS" = "true"}
|
||||||
runtime_container_options = [
|
runtime_container_options = [
|
||||||
|
# Mount Docker socket into the container so we can talk to Docker outside the container
|
||||||
"-v",
|
"-v",
|
||||||
"/var/run/docker.sock:/var/run/docker.sock",
|
"/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",
|
||||||
]
|
]
|
||||||
|
|||||||
@ -15,11 +15,13 @@
|
|||||||
|
|
||||||
- name: Read some files
|
- name: Read some files
|
||||||
slurp:
|
slurp:
|
||||||
src: "{{ item }}"
|
src: "{{ path }}"
|
||||||
loop:
|
loop:
|
||||||
- /proc/self/cpuset
|
- /proc/self/cpuset
|
||||||
- /proc/1/cgroup
|
- /proc/1/cgroup
|
||||||
- /proc/1/environ
|
- /proc/1/environ
|
||||||
|
loop_control:
|
||||||
|
loop_var: path
|
||||||
|
|
||||||
- name: Print facts returned by module
|
- name: Print facts returned by module
|
||||||
debug:
|
debug:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user