ansible error: skipping: no hosts matched
The answer is in the warning you get:
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'

When you use hosts: all in your playbook, localhost is not matched.
If you want to run the playbook on localhost, you can do one of the following:

Change your playbook to hosts: localhost.
Explicitly provide an inventory file that has localhost.

You can create an inventory file - inventory.yml with the contents:
all:
  hosts:
    localhost

and then pass this inventory file to ansible explicitly like this:
$ ansible-playbook --connection=local -i inventory.yml playbook.yml
You can find more information about inventory in the Ansible documentation.