Skip to content

Commit

Permalink
get output of docker ps -a
Browse files Browse the repository at this point in the history
  • Loading branch information
szachovy committed Jun 22, 2024
1 parent bc6bd1d commit d79b5c4
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
3 changes: 0 additions & 3 deletions tests/testsuite/roles/testing/files/requirements.txt

This file was deleted.

26 changes: 26 additions & 0 deletions tests/testsuite/roles/testing/tasks/functional.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,30 @@
---
- name: Execute Docker commands on multiple containers
block:
- ansible.builtin.loop:
start: 0
end: 4
step: 1
register: node_indices
- community.docker.docker_container_exec:
container: "{{ node_prefix }}-{{ item.index }}"
command: "/bin/bash -c 'docker ps -a'"
timeout: 15
register: docker_output
loop: "{{ node_indices.results }}"
- debug:
msg: "=== {{ item.item }} ==="
verbosity: 2
loop: "{{ docker_output.results }}"
- debug:
msg: "STDOUT: {{ item.stdout_lines }}"
verbosity: 2
loop: "{{ docker_output.results }}"
- debug:
msg: "STDERR: {{ item.stderr_lines }}"
verbosity: 2
loop: "{{ docker_output.results }}"

- name: "install required pip packages on {{ node_prefix }}-4"
community.docker.docker_container_exec:
container: "{{ node_prefix }}-4"
Expand Down

0 comments on commit d79b5c4

Please sign in to comment.