Estou tentando descobrir como parar instantaneamente meu playbook quando os testes falham para uma ramificação específica, master
neste caso.
Este é meu código Ansible:
- name: 'Run Tests'
shell: testing.sh | tee "testing.log"
register: testing
- name: 'Show log'
debug:
msg: "{{ testing.stdout_lines }}"
- name: 'Set fact'
set_fact:
tests: >-
{{
testing.stdout_lines | join(' ') | regex_findall('(\d+)\s*failed') | map('int') | max == 0
}}