gitea.kwerezigua.org is now online

This commit is contained in:
Ibrahim Mkusa 2024-09-08 08:05:58 -04:00
parent 53259a3ebb
commit 21426572cc
2 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,27 @@
---
- name: installs and setups nginx on hosts
hosts: aws
become: true
vars:
gitea_website: gitea.kwerezigua.org
proxy: localhost:3000
tasks:
- name: install nginx and supporting packages
apt:
name: "{{item}}"
state: latest
loop:
- caddy
- ufw
- name: edit caddyfile with desired services
ansible.builtin.template:
src: ../templates/Caddyfile.j2
dest: /etc/caddy/Caddyfile
- name: start caddy service
systemd:
name: caddy
state: started
enabled: true

3
templates/Caddyfile.j2 Normal file
View File

@ -0,0 +1,3 @@
{{gitea_website}} {
reverse_proxy {{proxy}}
}