What is the meaning of the 'connection' Ansible directive?

Viewed 976
---
  - name: Upgrade Device
    hosts: all
    gather_facts: no
    connection: local

As far as I know, an Ansible Playbook is always executed by the managed hosts where the connection link between them and the control nodes is through SSH.
What does the 'connection' directive do exactly ?

1 Answers

It is to execute the tasks locally on the same host (i.e., the controller) where the playbook is run.

From the documentation,

It may be useful to use a playbook locally, rather than by connecting over SSH.

Related