Collecting unreachable hosts list

In my playbook, I have included a role in my first play to generate a report from template.
And in my second play, updating same report.

When I keep both play in different file and run, both updating the file.
But if both play are in same playbook, first play working fine. second play does not work.

Second play is about collecting unreachable hosts.
Please help me to find the issue.

use:
- meta: clear_host_errors

At the end of your first play or your 2nd play will already remove
unreachable hosts when creating the list to iterate over.

When you run in 2 different instances, the 'memory' of unreachable
hosts is gone, that is why they work separately.