mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
8830cde28d
Fix 'task name is not templated in retry callback' Add a task_name property to TaskResult that knows to check in TaskResult._task_fields. Add integration test for v2_retry_runner callback Fixes #18236
13 lines
491 B
Bash
Executable file
13 lines
491 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -eux
|
|
|
|
# we are looking to verify the callback for v2_retry_runner gets a correct task name, include
|
|
# if the value needs templating based on results of previous tasks
|
|
OUTFILE="callback_retry_task_name.out"
|
|
trap 'rm -rf "${OUTFILE}"' EXIT
|
|
|
|
EXPECTED_REGEX="^.*TASK.*18236 callback task template fix OUTPUT 2"
|
|
ansible-playbook "$@" -i ../../inventory test.yml | tee "${OUTFILE}"
|
|
echo "Grepping for ${EXPECTED_REGEX} in stdout."
|
|
grep -e "${EXPECTED_REGEX}" "${OUTFILE}"
|