Welcome to the Linux Automation Project! 🌟 This repository contains automation scripts and tools designed to streamline server provisioning, configuration management, and deployment tasks for both Linux and systems. Whether you're managing a single server or an entire infrastructure, this project aims to make your life as a sysadmin easier.
This project provides automation scripts and playbooks to simplify common sysadmin tasks such as:
- Server provisioning
- Configuration management
- Backup automation
- Monitoring setup
The tools used in this project include:
- Ansible for configuration management
- Shell scripting for lightweight automation
- Terraform for infrastructure provisioning (optional)
✅ Automate server setup for both Linux
✅ Provision VMs/containers with ease
✅ Deploy services like Nginx, Apache, and more
✅ Backup automation with rsync
and cron
✅ Monitor system resources with custom scripts
Before you begin, ensure you have the following installed on your system:
- Python 3.x (for Ansible)
- Ansible (
pip install ansible
) - SSH access to target servers
- Git (to clone this repository)
-
Clone the Repository:
git clone https://github.com/dani-fernando/linux-automation.git cd linux-automation
-
Install Dependencies:
pip install -r requirements.txt
-
Configure SSH Access: Ensure your SSH key is added to the target servers for passwordless login. You can add your public key to the
~/.ssh/authorized_keys
file on each server. -
Customize Inventory: Edit the
inventory.yml
file to include the IP addresses or hostnames of your target servers:all: hosts: server1: ansible_host: 192.168.1.10 server2: ansible_host: 192.168.1.11
To automate server setup using Ansible:
ansible-playbook -i inventory.yml playbooks/setup-server.yml
Run the backup script manually or schedule it via cron
:
./scripts/backup.sh
To schedule daily backups, add the following to your crontab:
0 2 * * * /path/to/scripts/backup.sh
Run the monitoring script to check CPU usage:
./scripts/monitor-cpu.sh
We welcome contributions from the community! Here's how you can help:
- Fork the repository.
- Create a new branch for your feature/fix:
git checkout -b feature-name
- Commit your changes:
git commit -m "Add feature/fix description"
- Push to your fork:
git push origin feature-name
- Open a pull request on GitHub.
Please ensure your code follows best practices and includes appropriate documentation.
This project is licensed under the MIT License. See the LICENSE file for details.
If you have any questions or need further assistance, feel free to reach out:
- Email: [email protected]
- GitHub: Dani Fernando
Happy automation 🤖✨