33 lines
488 B
Markdown
33 lines
488 B
Markdown
## Core Concepts
|
|
|
|
### Inventory
|
|
File listing managed hosts (servers):
|
|
```ini
|
|
[webservers]
|
|
web1.example.com
|
|
web2.example.com
|
|
|
|
[databases]
|
|
db1.example.com
|
|
```
|
|
|
|
### Playbooks
|
|
YAML files describing desired state:
|
|
```yaml
|
|
- name: Install nginx
|
|
hosts: webservers
|
|
tasks:
|
|
- name: Install nginx
|
|
apt:
|
|
name: nginx
|
|
state: present
|
|
```
|
|
|
|
### Modules
|
|
Reusable units of work (apt, yum, copy, service, etc.)
|
|
|
|
### Roles
|
|
Organized collections of tasks, handlers, and files
|
|
|
|
---
|