- name: Run RCCL Tests hosts: all become: yes any_errors_fatal: true vars_files: - vars.yml tasks: - name: Create temp dir on remote host ansible.builtin.file: path: /tmp/{{ container_name }}/rccl-tests state: directory - name: Sync files to remote host ansible.posix.synchronize: src: "{{ playbook_dir }}/rccl-tests/" dest: /tmp/{{ container_name }}/rccl-tests/ - name: Copy files into container ansible.builtin.shell: | docker cp /tmp/{{ container_name }}/rccl-tests/. {{ container_name }}:{{ work_dir }} docker cp /tmp/{{ container_name }}/rccl-tests/mpirun_rccltest {{ container_name }}:/usr/local/bin/mpirun_rccltest docker exec {{ container_name }} chmod +x /usr/local/bin/mpirun_rccltest - name: Run tests ansible.builtin.shell: | docker exec -e SSH_PORT={{ ssh_port | string }} \ -w {{ work_dir }} \ {{ container_name }} \ bash {{ work_dir }}/{{ test_script }} 2>&1 delegate_to: "{{ groups['all'][0] }}" run_once: true register: result - name: Show output ansible.builtin.debug: msg: "{{ result.stdout_lines }}" run_once: true - name: Cleanup temp dir ansible.builtin.file: path: /tmp/{{ container_name }} state: absent