You have
- tasks:
where you should have
tasks:
with no leading dash. That dash effectively starts a second play within the playbook, a play for which you have not specified “hosts:”.
Does the blank line at the top matter, or not having one is simply a best practice?
Walter