☁️Ansible
Also known as Ansible Playbook, Red Hat Ansible, ansible-playbook
A tool that sets up many servers at once. It reads its steps from a YAML file.
Think of it like
Think of it like a teacher who reads one list of steps to a class. Everyone does the same steps at once.
Example
Lucy's playbook installs Nginx on five servers. She runs it once, and all five are set up in a minute.
Why it matters
One file sets up any number of servers the same way. Nothing extra goes on the servers.
Definition
Example code
yaml
- hosts: web
become: true
tasks:
- name: Install nginx
ansible.builtin.apt:
name: nginx
state: presentCommon mistake
Key takeaways
- 1Playbooks in YAML. Steps that read like a list.
- 2Over SSH. No agent on the servers.
- 3Safe to rerun. Only differences change.