Categories

Category cover

Automation
155 posts

Category cover

Learning paths
119 posts

Category cover

CISO
22 posts

Category cover

Security
20 posts

Category cover

Notes
19 posts

Category cover

Personal Security
18 posts

Category cover

Infrastructure
12 posts

Category cover

OT/ICS
5 posts

Category cover

Books
3 posts

Category cover

UNetLab
3 posts

Category cover

Write-up
3 posts

Category cover

OSInt
2 posts

Category cover

My life
1 posts

Delegate Ansible tasks to a different host

Andrea Dainese
April 12, 2025
Post cover

By default, Ansible executes playbooks on a single host. However, in various scenarios, tasks need to be executed across multiple hosts in a

By default, Ansible executes playbooks on a single host. However, in various scenarios, tasks need to be executed across multiple hosts in a specific sequence. A common example is a web server that must be taken offline from the load balancer before being modified. A typical playbook for this scenario would:

  • Reconfigure the load balancer to take the web server offline
  • Reconfigure the web server
  • Reconfigure the load balancer to bring the web server back online

If we refer to our previously mentioned network fabric, we can adapt this approach:

Continue reading the post on Patreon .