How to run Ansible playbook on local machine

In order to run an Ansible playbook locally, use

ansible-playbook --connection=local --inventory 127.0.0.1, playbook.yml