This Ansible project sets up a highly available Nginx configuration using Keepalived on Ubuntu servers. The setup includes load balancing and failover capabilities.
- Ubuntu target servers
- Ansible 2.9 or higher
- Python 3.x
.
├── inventory/
│ └── hosts.yml
├── group_vars/
│ └── all.yml
├── roles/
│ ├── nginx/
│ └── keepalived/
├── site.yml
└── README.md
- Update the inventory file with your server details
- Configure variables in group_vars/all.yml
- Run the playbook:
ansible-playbook -i inventory/hosts.yml site.ymlThe setup includes:
- Nginx installation and configuration
- Keepalived installation and configuration
- Virtual IP (VIP) configuration
- Health checks
- Failover setup