# retry file not generated if failed hosts associated to succeded hosts

**URL:** <https://forum.ansible.com/t/retry-file-not-generated-if-failed-hosts-associated-to-succeded-hosts/21203>\
**Category:** Ansible Project\
**Created:** [April 19, 2016, 7:48am UTC](https://forum.ansible.com/t/retry-file-not-generated-if-failed-hosts-associated-to-succeded-hosts/21203 "2016-04-19T07:48:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nickwe3](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/nickwe3/32/9765_2.png) [@nickwe3](https://forum.ansible.com/u/nickwe3)\
**Post date:** [April 19, 2016, 7:48am UTC](https://forum.ansible.com/t/retry-file-not-generated-if-failed-hosts-associated-to-succeded-hosts/21203/1 "2016-04-19T07:48:08Z")

</div>

Hello,

I don’t know if it’s a bug or not, so I prefer to ask first:

`ansible --version ansible 2.1.0 (devel 0e2f1b423d) last updated 2016/04/19 09:21:18 (GMT +200) lib/ansible/modules/core: (detached HEAD 5409ed1b28) last updated 2016/04/19 09:22:20 (GMT +200) lib/ansible/modules/extras: (detached HEAD 3afe117730) last updated 2016/04/19 09:22:20 (GMT +200) config file = /etc/ansible/ansible.cfg configured module search path = Default w/o overrides`

When I run a playbook, if a failed host is associated with a successful host, it won’t generate a retry file while if the playbook is run only on failed hosts, the retry file will be generated:

`

# ansible-playbook command\_check.yml -l ‘db1.avau,db1.avip’

PLAY [all] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

TASK [Check command] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
changed: [db1.avau]

cmd: crontab -l | grep ansible

start: 2016-04-19 09:32:30.193211

end: 2016-04-19 09:32:30.205075

delta: 0:00:00.011864

stdout: # WARNING: Ansible managed: /etc/ansible/templates/croot.j2 modified on 2016-03-24 10:18:01 by manjaro on manjaro  
fatal: [db1.avip]: FAILED! =\> {“changed”: true, “cmd”: “crontab -l | grep ansible”, “delta”: “0:00:00.012649”, “end”: “2016-04-19 09:32:30.586609”, “failed”: true, “rc”: 1, “start”: “2016-04-19 09:32:30.573960”, “stderr”: “”, “stdout”: “”, “stdout\_lines”: , “warnings”: }

cmd: crontab -l | grep ansible

start: 2016-04-19 09:32:30.573960

end: 2016-04-19 09:32:30.586609

delta: 0:00:00.012649

NO MORE HOSTS LEFT \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
db1.avau : ok=1 changed=1 unreachable=0 failed=0  
db1.avip : ok=0 changed=0 unreachable=0 failed=1  
`

and

`

# ansible-playbook command\_check.yml -l ‘db1.avip,db1.autovise’

PLAY [all] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

TASK [Check command] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
fatal: [db1.autovise]: FAILED! =\> {“changed”: true, “cmd”: “crontab -l | grep ansible”, “delta”: “0:00:00.012493”, “end”: “2016-04-19 09:46:20.225544”, “failed”: true, “rc”: 1, “start”: “2016-04-19 09:46:20.213051”, “stderr”: “”, “stdout”: “”, “stdout\_lines”: , “warnings”: }

cmd: crontab -l | grep ansible

start: 2016-04-19 09:46:20.213051

end: 2016-04-19 09:46:20.225544

delta: 0:00:00.012493  
fatal: [db1.avip]: FAILED! =\> {“changed”: true, “cmd”: “crontab -l | grep ansible”, “delta”: “0:00:00.013013”, “end”: “2016-04-19 09:46:20.571096”, “failed”: true, “rc”: 1, “start”: “2016-04-19 09:46:20.558083”, “stderr”: “”, “stdout”: “”, “stdout\_lines”: , “warnings”: }

cmd: crontab -l | grep ansible

start: 2016-04-19 09:46:20.558083

end: 2016-04-19 09:46:20.571096

delta: 0:00:00.013013

NO MORE HOSTS LEFT \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
to retry, use: --limit @/etc/ansible/.ansible-retry/command\_check.retry

PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
db1.autovise : ok=0 changed=0 unreachable=0 failed=1  
db1.avip : ok=0 changed=0 unreachable=0 failed=1

`

Regards,

Nicolas.
