maabara/playbooks/caddy/setup_webserver.yml

29 lines
621 B
YAML
Raw Normal View History

2024-09-08 12:05:58 +00:00
---
2024-11-05 00:05:34 +00:00
- name: installs and setups caddy on hosts
2024-09-08 12:05:58 +00:00
hosts: aws
become: true
vars:
gitea_website: gitea.kwerezigua.org
gitea_website2: gitea.ibrahimmkusa.com
2024-09-08 12:05:58 +00:00
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