Chapter 11: Ansible Introduction
Chala mitrano, aaj aapan Ansible — config management. Vis playbooks ne 20 identical lab servers uthavuya. Inventory, modules, playbooks, idempotence, ad-hoc ping / package / copy / service, simple role layout, aani Bash vs Ansible. Nginx deep hosting AWS course madhe — ithe fakt example target. Ghabru naka: ek playbook ne Nginx + badge API index.
What you will learn in this chapter
- Inventory, modules, playbooks, idempotence
- Ad-hoc ping, package, copy, service
- Simple role folder layout
- Configure a web welcome page without rewriting AWS chapters
- When Ansible beats raw shell scripts
Concepts in this chapter
- 11.1Why Ansible — one playbook for many servers
- 11.2Inventory — who are we configuring?
- 11.3Modules and ad-hoc commands
- 11.4Idempotence — run twice, safe result
- 11.5Playbook — Nginx welcome for badge API
- 11.6Handlers — restart only when needed
- 11.7Simple role folder layout
- 11.8Variables, vault awareness and secrets
- 11.9Ansible vs shell scripts — choose deliberately
- 11.10Troubleshooting table
- 11.11Git layout for Ansible labs
- 11.12Lab — playbook installs Nginx welcome
- 11.13What good looks like after this chapter
Review and practice
- ★11.5b ansible.cfg for friendlier labs
- ★11.9b Check mode and diff
- ★11.9c Tags — run part of a playbook
- ★11.9d Dynamic inventory (awareness)
- ★11.10b Limit and serial (awareness)
The chapter recap is at the end of the last concept page.