gitea.kwerezigua.org is now online
This commit is contained in:
parent
53259a3ebb
commit
21426572cc
27
playbooks/setup_webserver.yml
Normal file
27
playbooks/setup_webserver.yml
Normal 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
3
templates/Caddyfile.j2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{{gitea_website}} {
|
||||||
|
reverse_proxy {{proxy}}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user