Having ansible error Level 1

Replace the inventory stuff with the above one, and re-run the ansible-playbook -i inventory playbook.yml command.

what will be the hosts

hosts will be the ‘webserver’. Don’t remove that part from the inventory file.

This worked. Please correct what my error was

Single quote was the error. Did you copy and paste that inventory from your system notepad to the terminal?

You can simply compare what I shared above with what you shared.

No, its from the terminal. Now i guess what the error was:
'-o
rather
’ -o