--- - name: Ensure ~/zuul-output/logs ansible.builtin.file: path: ~/zuul-output/logs state: directory when: - glue # Empty the sf-operator.log output before the run - name: Clear previous log file ansible.builtin.file: path: ~/zuul-output/logs/{{ log_file }} state: absent when: - glue - name: Run the operator in standalone mode ansible.builtin.shell: | set -o pipefail go run main.go {{ cli_global_flags }} deploy {{ cr_path }} {% if dry_run | default(false) %}--dry-run{% endif %} 2>&1 | tee -a ~/zuul-output/logs/{{ log_file }} args: chdir: "{{ zuul.project.src_dir }}" - name: Copy current spec ansible.builtin.shell: "cp {{ cr_path }} {{ current_cr_path }}" args: chdir: "{{ zuul.project.src_dir }}" when: - glue