Skip to content

Commit

Permalink
Remove debug tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
vyzigold committed Nov 1, 2024
1 parent c285028 commit 27ee240
Showing 1 changed file with 1 addition and 36 deletions.
37 changes: 1 addition & 36 deletions roles/common/tasks/container_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,49 +3,14 @@
ansible.builtin.set_fact:
container_name: "{{ item }}"

- name: debug - print groups[computes]
ansible.builtin.debug:
var: groups['computes']

- name: debug - try whoami with delegate_to
ansible.builtin.shell:
cmd: |
whoami
changed_when: false
register: results
delegate_to: "{{ compute_node }}"
become: true
loop: "{{ groups['computes'] }}"
loop_control:
loop_var: compute_node

- name: debug - print output of whoami commands
ansible.builtin.debug:
var: results

- name: debug - try podman cmd without grep
ansible.builtin.shell:
cmd: |
podman ps -a --format "{{ '{{.Names}} {{.Status}}' }}"
changed_when: false
register: results
delegate_to: "{{ compute_node }}"
become: true
loop: "{{ groups['computes'] }}"
loop_control:
loop_var: compute_node

- name: debug - print output of podman commands
ansible.builtin.debug:
var: results

- name: Get container status
ansible.builtin.shell:
cmd: |
podman ps -a --format "{{ '{{.Names}} {{.Status}}' }}" | grep {{ container_name }}
changed_when: false
register: container_status
delegate_to: "{{ compute_node }}"
# The containers on compute nodes seem to run on the root user, so we need to connect as root
become: true
loop: "{{ groups['computes'] }}"
loop_control:
Expand Down

0 comments on commit 27ee240

Please sign in to comment.