1
0

Remove caddy system-wide installation

This commit is contained in:
Anton Vakhrushev 2025-05-06 12:00:32 +03:00
parent 280ea24dea
commit 41fac2c4f9
Signed by: av
GPG Key ID: F5BF52FC352E255A
4 changed files with 5 additions and 96 deletions

View File

@ -1,26 +0,0 @@
---
- name: "Install and configure Caddy server"
hosts: all
vars_files:
- vars/ports.yml
- vars/vars.yml
tasks:
- name: "Ensure networkd service is started (required by Caddy)."
ansible.builtin.systemd:
name: systemd-networkd
state: started
enabled: true
- name: "Install and configure Caddy server"
ansible.builtin.import_role:
name: caddy_ansible.caddy_ansible
vars:
caddy_github_token: "{{ caddy_vars.github_token }}"
caddy_config: '{{ lookup("template", "templates/Caddyfile.j2") }}'
caddy_setcap: true
caddy_systemd_capabilities_enabled: true
caddy_systemd_capabilities: "CAP_NET_BIND_SERVICE"
# Поменяй на true, чтобы обновить Caddy
caddy_update: false

View File

@ -25,3 +25,8 @@
ansible.builtin.file:
path: "/var/www/{{ user_name }}"
state: absent
- name: "Remove home dir"
ansible.builtin.file:
path: "/home/{{ user_name }}"
state: absent

View File

@ -7,6 +7,3 @@
- src: geerlingguy.docker
version: 7.4.3
- src: caddy_ansible.caddy_ansible
version: v3.2.0

View File

@ -1,67 +0,0 @@
# -------------------------------------------------------------------
# Global options
# -------------------------------------------------------------------
{
grace_period 15s
}
# -------------------------------------------------------------------
# Netdata service
# -------------------------------------------------------------------
status.vakhrushev.me, :29999 {
tls anwinged@ya.ru
reverse_proxy {
to 127.0.0.1:{{ netdata_port }}
}
basicauth / {
{{ netdata.login }} {{ netdata.password_hash }}
}
}
# -------------------------------------------------------------------
# Applications
# -------------------------------------------------------------------
vakhrushev.me {
tls anwinged@ya.ru
reverse_proxy {
to 127.0.0.1:{{ homepage_port }}
}
}
git.vakhrushev.me {
tls anwinged@ya.ru
reverse_proxy {
to 127.0.0.1:{{ gitea_port }}
}
}
kk.vakhrushev.me {
tls anwinged@ya.ru
reverse_proxy {
to 127.0.0.1:{{ keycloak_port }}
}
}
outline.vakhrushev.me {
tls anwinged@ya.ru
reverse_proxy {
to 127.0.0.1:{{ outline_port }}
}
}
gramps.vakhrushev.me {
tls anwinged@ya.ru
reverse_proxy {
to 127.0.0.1:{{ gramps_port }}
}
}