Regular Expressions 101

Ansible Playbook Execution - Task Output

1

Regular Expression
Python

r"
TASK\s\[(?P<task_name>[A-Za-z0-9_ -]+)\]\s\*+\n(?P<host_result_block>.*?((?=^TASK\s)|(?=^PLAY\sRECAP)))
"
gms

Description

Parse Task Titles and capture results/output of each task

Submitted by Paul Cummings - 5 months ago