What does localhost ansible_connection=local mean in an Ansible inventory?
localhost ansible_connection=local
Treat every remote host as an alias for localhost.
Run managed-host tasks on the controller itself without an SSH connection.
Force Ansible to authenticate to localhost over SSH.
Prevent playbook tasks from running on localhost.