#!/usr/bin/env ansible-playbook
---

- name: RUN TESTER
  hosts: all
  tags: tester
  gather_facts: false
  vars:
    tester_reset_log: false
  tasks:
    - name: remove envsetup tester log
      when: tester_reset_log
      file:
        path: /root/envsetup/logs/tester.txt
        state: absent
    - name: envsetup tester
      shell:
        cmd: |
          set -o pipefail
          python3 /root/envsetup/tester.py 2>&1 | tee /root/envsetup/logs/tester.txt
        creates: /root/envsetup/logs/tester.txt
        executable: /bin/bash

...
