| name | arabic-ansible |
| name_ar | أنسيبل |
| description | Master automation with Ansible in Arabic |
| description_ar | إتقان الأتمتة مع أنسيبل بالعربية |
| category | developer |
| language | ar |
| dialect | msa |
| rtl | true |
| platform_all | true |
| version | 1.0.0 |
| author | salman-shaikh |
الهدف
إتقان أتمتة البنية التحتية والتطبيقات باستخدام Ansible.
المفاهيم الأساسية
| المصطلح | الوصف |
|---|
| Inventory | قائمة السيرفرات |
| Playbook | مهام YAML |
| Task | مهمة واحدة |
| Module | وحدة تنفيذ |
| Role | حزمة مهام قابلة لإعادة الاستخدام |
| Handler | مهمة تعمل عند التغيير |
تثبيت Ansible
sudo apt install ansible
pip install ansible
ansible --version
Inventory ملف
[webservers]
web1.example.com
web2.example.com
[dbservers]
db1.example.com ansible_ssh_user=root
[all:vars]
ansible_python_interpreter=/usr/bin/python3
Playbook مثال
---
- name: Deploy Web Server
hosts: webservers
become: yes
vars:
http_port: 80
max_clients: 200
tasks:
- name: Install Apache
apt:
name: apache2
state: present