local connection
The connection plugin that runs modules directly on the control node, with no SSH and no network at all.
In more detail
Setting ansible_connection=local on localhost is how this course runs every example on one laptop. Because connection settings are trusted variables, setting local on any host name makes the module run on your own machine while wearing that host's name, which is a surprising result worth knowing.
Example
localhost ansible_connection=localRelated terms
- connection plugin — The plugin that decides how Ansible reaches a host: SSH by default, or local, WinRM, a container runtime or a network device protocol.
- localhost — The name a machine uses for itself; traffic sent there never leaves that machine.
- control node — The machine where Ansible is installed and where you run its commands; it reaches out to every other machine it manages.
Taught in
- Ansible Architecture And The Control Node — Ansible Configuration Management at Scale
- The Static Inventory File — Ansible Configuration Management at Scale
- Host Groups And Host Variables — Ansible Configuration Management at Scale
- Dynamic Inventory — Ansible Configuration Management at Scale
- Connections And Privilege Escalation — Ansible Configuration Management at Scale
- Playbook Syntax And YAML — Ansible Configuration Management at Scale
- Writing Your First Playbook — Ansible Configuration Management at Scale
- Modules And Idempotency — Ansible Configuration Management at Scale
- Check Mode And Diff — Ansible Configuration Management at Scale
- Handlers And Notify — Ansible Configuration Management at Scale
- Variables And Precedence — Ansible Configuration Management at Scale
- Gathering Facts — Ansible Configuration Management at Scale
- Conditionals — Ansible Configuration Management at Scale
- Loops — Ansible Configuration Management at Scale
- Templates With Jinja — Ansible Configuration Management at Scale
- Error Handling With Block, Rescue And Always — Ansible Configuration Management at Scale
- Writing A Role — Ansible Configuration Management at Scale