How do you preview changes on one host before a full rollout?
BeginnerProductionRapid-Fire Commands
Answer
ansible-playbook site.yml --check --diff --limit web01
ansible-playbook site.yml --diff --limit web01 # real change, still showing diffs
Check one canary host first, then the real run on that host, then the rest. Tasks with no_log or binary files will not show diffs.
More on Rapid-Fire Commands
How do you see which hosts a playbook would run against, without running it?BeginnerHow do you list the tasks and tags a playbook contains?BeginnerHow do you inspect the inventory structure and a host's variables?BeginnerHow do you restart a service on a group with an ad-hoc command?BeginnerHow do you resume a playbook from a specific task or step through it?BeginnerHow do you re-run a playbook only on the hosts that failed?Intermediate