Skip to content

Local Connection vs Delegation to localhost

erjac77 edited this page Jun 28, 2018 · 1 revision

What's the difference?

  • connection: local runs your entire playbook play locally
  • delegate_to: localhost runs a specific task on the localhost

Which one to use?

If your play contains only F5 BIG-IP hosts, it make sense to use connection: local keyword for your entire play.

However, if your play mixes remote hosts (like F5 BIG-IP systems and Web Servers), it make sense to use delegate_to: localhost keyword on your F5 BIG-IP tasks and let other tasks use the default remote connection.