How to run this playbook locally ?

Hey,

I’ve got this playbook here https://pastebin.mozilla.org/8980172

and what I want is just run it locally. My plan is that I run this playbook from another playbook or in other words another playbook is referencing to this playbook and that works, but if I want to run this particular playbook locally - it fails and reason behind is I think so called play definitions. So I was wondering is there any way to run this locally ? By saying locally I mean ansible-playbook playbook.yml

Thanks

Hey,

I've got this playbook here https://pastebin.mozilla.org/8980172

That's not a playbook, but a list of tasks.
You should probably start by reading the docs
https://docs.ansible.com/ansible/playbooks_intro.html

and what I want is just run it locally. My plan is that I run this playbook
from another playbook or in other words another playbook is referencing to
this playbook and that works, but if I want to run this particular playbook
locally - it fails and reason behind is I think so called play definitions.
So I was wondering is there any way to run this locally ? By saying locally
I mean ansible-playbook playbook.yml

- hosts: localhost in a playbook will run the playbook on localhost.

I’ve added what you said and I’ve got this:

ERROR! Syntax Error while loading YAML.

The error appears to have been in ‘/xxx.yml’: line 3, column
3, but may
be elsewhere in the file depending on the exact syntax problem.