This repository contains a collection of Ansible playbooks and roles for provisioning, updating, and managing Linux systems. It includes examples for service management, package installation, Apache setup, and role-based automation across server types.
The project is organized around a few core Ansible patterns:
- Playbooks for OS updates and package installation
- Role-based configuration for different host groups
- Apache-related automation for Ubuntu and AlmaLinux
- Service enablement and lifecycle tasks
- Example automation for workstations and file/server management
.
├── ansible.cfg
├── bootstrap.yml
├── enable_service.yml
├── install_apache2.yml
├── install_apache_alma.yml
├── readfriendly_apache_playbook.yml
├── readfriendlyV2_apache_playbook.yml
├── efficient_playbook.yml
├── remove_apache.yml
├── service_management.yml
├── site.yml
├── site_before_roles.yml
├── tags_playbook.yml
├── update_distro.yml
├── update_install_apache.yml
├── update_system.yml
├── workstation-terraform.yml
├── files/
├── roles/
│ ├── base/
│ ├── db_servers/
│ ├── file_servers/
│ ├── web_servers/
│ └── workstations/
├── LICENSE
├── README.md
└── .gitignore
site.yml— main entry point that includes base tasks and role assignments for host groups.install_apache2.yml— installs Apache and PHP support on Ubuntu hosts.install_apache_alma.yml— Apache installation workflow for AlmaLinux.update_distro.yml— updates package indexes and distribution packages.service_management.yml— examples for managing system services.bootstrap.yml— common bootstrap tasks for initial setup.tags_playbook.yml— demonstrates tag-based task execution.
The repository includes the following role groups:
base— common configuration for all managed hostsweb_servers— web server related tasksdb_servers— database server related tasksfile_servers— file serving configurationworkstations— workstation-oriented automation
Before running these playbooks, make sure you have:
- Ansible installed
- SSH access to your target hosts
- A valid inventory file and SSH key configured
- Appropriate permissions for package installation and service management
Example configuration is referenced from ansible.cfg, which points to an inventory file named inventory.ini.
Run a full site workflow:
ansible-playbook site.ymlInstall Apache on Ubuntu hosts:
ansible-playbook install_apache2.ymlRun a service management task:
ansible-playbook service_management.ymlThis repo is a practical Ansible learning and experimentation project covering common Linux administration tasks. It is intended as a reference for playbook structure, roles, and automation patterns rather than as a production-ready platform deployment.
This project is licensed under the MIT License. See the LICENSE file for details.