Skip to main content
RunBook Academy

AnsibleXXX · Host Targeting and Blast RadiusBlast radius

Blast radius as a design constraint

Intermediate⏱ ~22 minbash

What you'll learn

  • State the definition of blast radius used throughout this course
  • Separate host count from criticality and reason about them independently
  • Answer the four pre-run questions for a change you are about to make
  • Recognise when a small host count still represents a large blast radius

Prerequisites

Verified against ansible-core 2.21.x · ansible (community package) 14.x · Python (controller) 3.12+ · ansible-lint 26.x · Molecule 26.x · Ubuntu 24.04 LTS · Debian 12 (Bookworm) · RHEL / Rocky / AlmaLinux 9.x · 2026-08-11

Not yet marked complete on this device.

This course has used the phrase “blast radius” since the welcome page. Here is the definition it has been using, stated once, precisely, so that the rest of the part can build on it:

Blast radius is the number and criticality of the systems a mistake can affect.

Two nouns, and the second is the one people drop. A change that touches five hundred development laptops and a change that touches two database primaries have wildly different host counts and comparable consequences — arguably the second is worse, because the development boxes can be rebuilt this afternoon and the database primaries cannot.

Keeping the two axes separate is what makes the idea usable. Collapse them into “how many hosts” and you get a rule that says a two-host change is always safe, which is how production outages happen on Tuesdays.

Two axes, not one

Read-only / Safethe mental model this part refers back to
        high  |  restart 2 db primaries      patch all prod servers
            |  rotate the CA key           change prod firewall rules
criticality |
            |  install a package on        reconfigure logging on
      low   |  3 dev boxes                 400 dev boxes
            +----------------------------------------------------
               few hosts                        many hosts

The top-left quadrant is the one that gets skipped. It looks small — two hosts, a single command — and it carries the highest consequence per host in the estate. Every control in this course applies there too, and the fact that --limit db-primary01.example.com is short does not make the change safe.

The bottom-right quadrant is where people over-invest in ceremony and under-invest in the thing that actually helps: knowing the number. Four hundred development boxes is fine to change at once, provided the number really is four hundred development boxes and not four hundred hosts whose composition nobody checked.

The four questions

Before any run that changes anything, four questions. They are short, they are answerable from the command line, and the discipline is that you answer all four rather than the one that comes to mind.

1. What changes?

Not “what does the playbook do” — what will this invocation do. Tags, when: conditions and variables all narrow it.

Read-only / Safethe tasks this run would execute
$ ansible-playbook -i inventory/ site.yml --list-tasks
playbook: site.yml

play #1 (web): Configure the web tier	TAGS: []
  tasks:
    Placeholder	TAGS: []

Then --check --diff, which answers the question properly by reporting what would change on each host rather than what tasks exist. Its limits — modules without check-mode support, and a command task that skips — are covered in the check-mode lesson, and they are the reason --check is evidence rather than proof.

2. On which hosts?

This is the central skill of this part and it has its own lesson. The short version: ansible-playbook <playbook> --limit <pattern> --list-hosts, and read the count.

Read-only / Safethe number that is the blast radius
$ ansible-playbook -i inventory/ site.yml --limit us_east --list-hosts
playbook: site.yml

play #1 (web): Configure the web tier	TAGS: []
  pattern: ['web']
  hosts (3):
    web04.example.com
    web03.example.com
    web02.example.com

3. In what order?

A change that reaches every host simultaneously has no failure point at which you can stop. A change that reaches one host, then five, then the rest, has two.

Ordering is the difference between “we broke one host and stopped” and “we broke all of them”. serial, order: and canary groups are how it is expressed, and Parts XXXI and XXXII own them; what belongs here is that order is part of blast radius, not a separate concern. The same change to the same hosts has a different radius depending on whether it lands all at once.

4. How do I stop it?

The question nobody rehearses.

Interrupting ansible-playbook with Ctrl-C stops the controller from issuing further tasks. It does not undo what has run, and it does not recall a task already dispatched to a host. Under serial, hosts in later batches are simply never reached — which is the useful property, and is why batching is a stopping mechanism as much as a pacing one.

Knowing the answer means knowing three things before you start: how you will notice something is wrong, how you will halt the run, and what the recovery is for the hosts already changed. If the answer to the third is “restore from backup”, that is a legitimate answer and it changes how you would have sized the batch.

  1. What changes: --list-tasks for scope, then --check --diff for content.
  2. Which hosts: --list-hosts with the same --limit you will use for real, and read the count out loud.
  3. How many are critical: how many of those hosts are tier1, and does the count match the change ticket.
  4. In what order: is this one batch or several, and what is the first batch.
  5. How do I stop: what will show me it is going wrong, what halts it, and what recovers the hosts already changed.

The count is the control, and it has two failure directions

Both directions are silent, and this is the property that makes the habit necessary rather than merely sensible.

Too few. A pattern with a typo matches nothing. The run exits 0. A nightly job reports success for three weeks having done nothing.

Too many. A pattern that resolves to three hundred hosts when you meant thirty also exits 0, also reports success, and does change three hundred machines. There is no warning for “more than you expected”, because Ansible has no idea what you expected.

Knowledge check

Knowledge check · 4 questions

  1. Q1. Which of these changes has the larger blast radius: restarting a service on two production database primaries, or installing a package on four hundred development workstations?

  2. Q2. Why does this course treat execution order as part of blast radius rather than as a separate performance concern?

  3. Q3. Which statements about reversing an Ansible change are accurate? Select all that apply.

  4. Q4. Ansible warns you when a pattern resolves to substantially more hosts than the last time it was run.

Passing score: 75%. Answers are checked in this browser.