Cloud Computing & IaC in DevOps (Ansible)
Sahil Kasekar
DevOps Engineer @Philips | Ex-Intern @ZoHo | Software Development and Testing | Embedded Systems Enthusiast |
?? What is Ansible? ??
Ansible is an open-source configuration management and automation tool developed by Red Hat. It helps you:
Key Features:
?? Why Ansible in DevOps?
?? Real-World Analogy: Managing a Restaurant Chain ???
Imagine you manage a restaurant chain:
??? Installing Ansible
On Ubuntu/Linux: (bash)
sudo apt update
sudo apt install ansible -y
On macOS:(bash)
brew install ansible
Verify Installation:
ansible --version
?? Basic Ansible Concepts
1. Inventory:
[webservers]
server1.example.com
server2.example.com
2. Playbooks:
- name: Install and start Nginx
hosts: webservers
become: yes # Run as root
tasks:
- name: Install Nginx
apt:
name: nginx
state: present
- name: Start Nginx service
service:
name: nginx
state: started
3. Modules:
4. Tasks:
?? Running an Ansible Playbook
1. Create an Inventory File (inventory.ini):
[webservers]
192.168.1.10
2. Run the Playbook:
ansible-playbook -i inventory.ini playbook.yaml
??? Best Practices with Ansible ?
?? Fun Fact
Did you know that NASA uses Ansible to automate the deployment of software across its servers? Ansible’s reliability and simplicity make it a trusted choice for mission-critical tasks!
Engineering | IT Specialist | IT Project | Administrator | Virtualisation | Cyber Security | SOC | Cloud ?? | Networking ?
3 个月Very informative ??