Skip to content

Commit

Permalink
show what is running
Browse files Browse the repository at this point in the history
  • Loading branch information
szachovy committed Jun 22, 2024
1 parent d79b5c4 commit 0b47784
Showing 1 changed file with 10 additions and 25 deletions.
35 changes: 10 additions & 25 deletions tests/testsuite/roles/testing/tasks/functional.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,14 @@
---
- 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: Execute Docker command on container {{ node_prefix }}-{{ item }}
community.docker.docker_container_exec:
container: "{{ node_prefix }}-{{ item }}"
command: "/bin/bash -c 'docker ps -a'"
timeout: 15
register: docker_output
loop: [0, 1, 2, 3, 4]
- debug:
msg: "{{ item.stdout_lines }}"
loop: "{{ docker_output.results }}"

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

0 comments on commit 0b47784

Please sign in to comment.