This repository contains an Ansible automation project that provisions and configures Apache web servers automatically.
The playbook performs the following actions:
- Installs Apache (httpd)
- Starts and enables the Apache service
- Deploys a custom
index.htmlfile to the web server
This project demonstrates fundamental DevOps automation practices and Infrastructure as Code (IaC) principles using Ansible.
Below are key screenshots to verify infra, connectivity, syntax, and successful runs.
- Automate Apache installation
- Configure and manage system services
- Deploy static web content automatically
- Manage multiple servers using Ansible Inventory
- Apply idempotent configuration management
- Ansible
- Linux (Target Servers | EC2 Instances)
- Apache (httpd)
- SSH Authentication
Ansible-Automation-Task/
│
├── ansible.cfg # Ansible configuration file
├── inventory # Target hosts definition
├── playbook.yml # Main automation playbook
├── index.html # Custom web page
└── README.md # Project documentation
Before running this project, ensure you have:
- Ansible installed on the Control Node
- SSH access to the target servers
- SSH key-based authentication configured (recommended)
- Linux-based target machines (e.g., CentOS / RHEL)
ansible --versiongit clone https://github.com/engasaleh/Ansible-Automation-Task.gitcd Ansible-Automation-TaskEdit the inventory file and replace the IP addresses with your target servers.
Example:
[webservers]
192.168.1.10 ansible_user=ec2-useransible-playbook -i inventory playbook.ymlAfter successful execution:
- Apache will be installed
- Apache service will be running and enabled
- The custom
index.htmlpage will be deployed to the web root directory
You can access the web server using:
http://<server-ip>




