I have some strange behavior with the execution of a playbook.
If i run
ansible-playbook <playbook> --list-hosts
i get 75 hosts. That is the number of hosts i am expecting.
But if i run the playbook without “list-hosts” it is only executed on 68 hosts.
I don’t know why there are some hosts missing.
These hosts are not shown in the play recap at the end of the playbook and not found in the logging while execution. Like there are disappeared.
Do you know why this can happen?
I am using ansible version 2.18.0
This does sound unusual. If the servers where skipped by a when clause, there would be a mention in the log output and they would appear in the recap at the end.
Generate a list of the 13 hosts and see what they have in common to help understand why they might have been skipped.
You can take the 75 hosts from --list-hosts and put them in all.txt and the 68 hosts from the recap and put them executed.txt and then use:
grep -Fxv all.txt executed.txt
To find the 13 that weren’t executed. Are they different distro or version? Do they have something in common?