показывайте таск и полный кусок ошибки
molecule/default/converge.yaml:
---
- name: test retries
hosts: localhost
tasks:
- name: test failure
command: "/usr/bin/env false"
retries: 5
delay: 1
ansible-playbook molecule/default/converge.yaml:
TASK [test failure] ****
FAILED - RETRYING: [localhost]: test failure (5 retries left).
FAILED - RETRYING: [localhost]: test failure (4 retries left).
FAILED - RETRYING: [localhost]: test failure (3 retries left).
FAILED - RETRYING: [localhost]: test failure (2 retries left).
FAILED - RETRYING: [localhost]: test failure (1 retries left).
fatal: [localhost]: FAILED! => {"attempts": 5, "changed": true, "cmd": ["/usr/bin/env", "false"], "delta": "0:00:00.003494", "end": "2024-10-20 15:15:46.435658", "msg": "non-zero return code", "rc": 1, "start": "2024-10-20 15:15:46.432164", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
При запуске molecule -v converge не вываливает раз в секунду, а ждёт 5 секунд и вываливает сразу всё. Правда, в другом порядке:
TASK [test failure] ***
fatal: [localhost]: FAILED! => {"attempts": 5, "changed": true, "cmd": ["/usr/bin/env", "false"], "delta": "0:00:00.003638", "end": "2024-10-20 15:16:41.354998", "msg": "non-zero return code", "rc": 1, "start": "2024-10-20 15:16:41.351360", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
FAILED - RETRYING: [localhost]: test failure (5 retries left).
FAILED - RETRYING: [localhost]: test failure (4 retries left).
FAILED - RETRYING: [localhost]: test failure (3 retries left).
FAILED - RETRYING: [localhost]: test failure (2 retries left).
FAILED - RETRYING: [localhost]: test failure (1 retries left).