CICD-254 · Multi-host deployment
Encyclopedia · Ansible and configuration management · All snippets
Previous · CICD-253 · Next · CICD-255
1. Where it fits
- Placement CI deploy job.
- Prerequisites controller with reviewed inventory, pinned Ansible collections and a non-production target.
- Platforms local-linux, github-actions, gitea-actions.
2. Copy the snippet
bash
ansible-playbook -i inventory/staging.yml playbooks/deploy.yml --limit web --forks 53. How it works
The selected inventory and limit determine the hosts a playbook can affect. Syntax check and check mode give different forms of preflight evidence.
4. Verify the result
Confirm intended hosts with --list-hosts before running. Failure recap should surface host-level failures.
Validation syntax-validated (Bash parse). Status definitions.