Appearance
Ansible
Ansible is an open-source automation tool for configuration management, application deployment, and orchestration.
Why Ansible?
- Agentless (uses SSH).
- Human-readable YAML playbooks.
- Strong ecosystem of modules.
Getting Started
Install
bash
pip install ansibleFirst Inventory
inventory.ini
ini
[webservers]
192.168.56.10
192.168.56.11First Playbook
site.yml
yaml
- name: Install Apache Webserver
hosts: webservers
become: yes
tasks:
- name: Ensure Apache is installed
apt:
name: apache2
state: present
- name: Ensure Apache is running
service:
name: apache2
state: startedRun:
bash
ansible-playbook -i inventory.ini site.ymlMore playbooks and homelab experiments with Ansible coming soon