before I file a bug report
playbook to reproduce is below
change hosts line to specify three or more individual hosts, or a group containing three or more hosts
after running playbook /tmp/test.out is expected to contain 1 line for each host
but it will often be missing one or more lines
run playbook again and get a different result
forgot to state, this error was produced running ansible 1.7 from linux and mac
to get the result you want you’ll need either serial or forks set to 1, being concurrent processes you are not guaranteed they happen in perfect succession.
running with --forks=1 makes problem go away
actually, if I set serial to 1 the first task which has a run_once ends up running multiple times, which breaks the playbook
run_once, runs once per specified hosts. Serial causes this to run for each batch.
So serial: 1 with run_once causes the task to run for every host.