This project automates the deployment of PostgreSQL and MongoDB database infrastructure and Application servers on Hetzner servers using Ansible, with secrets management handled securely via Doppler.
- Ansible
- Doppler CLI
- Hetzner Cloud account
- SSH access to Hetzner servers
- Install Ansible: Follow the Ansible installation guide.
- Install Doppler CLI: Follow the Doppler installation guide.
doppler login
doppler setupdatabases_ansible/
├── ansible.cfg # Ansible configuration file
├── inventory/hetzner.ini # Hetzner servers inventory
├── group_vars/all.yml # Variables loaded from Doppler environment
├── playbooks/deploy.yml # Main deployment playbook
├── roles/ # Ansible roles (Docker, Postgres, MongoDB)
│ ├── docker/
│ ├── postgres/
│ └── mongodb/
stack_ansible/
├── ansible.cfg # Ansible configuration file
├── inventory/hetzner.ini # Hetzner servers inventory
├── group_vars/all.yml # Variables loaded from Doppler environment
├── playbooks/deploy.yml # Main deployment playbook
│ ├── deploy.yml # Main deployment playbook
│ └── nginx_config/
│ ├── conf.d/default.conf # Default Nginx configuration
│ └── nginx.conf # Nginx configuration file
├── roles/ # Ansible roles (App, Nginx)
│ ├── app/ # Application server role
│ └── nginx/ # Nginx server role
README.md