roles/caddy: fix issues
This commit is contained in:
parent
e0b7c5a15e
commit
a1c44da446
@ -7,3 +7,6 @@
|
|||||||
website_path: /srv/http
|
website_path: /srv/http
|
||||||
|
|
||||||
gitea_domain: "git.{{ domain }}"
|
gitea_domain: "git.{{ domain }}"
|
||||||
|
|
||||||
|
## send renewal reminders to this address
|
||||||
|
email: null
|
||||||
|
@ -9,6 +9,14 @@
|
|||||||
template:
|
template:
|
||||||
src: Caddyfile.j2
|
src: Caddyfile.j2
|
||||||
dest: /etc/caddy/Caddyfile
|
dest: /etc/caddy/Caddyfile
|
||||||
|
lstrip_blocks: true
|
||||||
|
register: caddy_config
|
||||||
|
|
||||||
|
- name: Restart Caddy service
|
||||||
|
service:
|
||||||
|
name: caddy
|
||||||
|
state: restarted
|
||||||
|
when: caddy_config.changed
|
||||||
|
|
||||||
- name: Enable Caddy service
|
- name: Enable Caddy service
|
||||||
service:
|
service:
|
||||||
|
@ -1,12 +1,18 @@
|
|||||||
|
{
|
||||||
|
{% if email is not none %}
|
||||||
|
email {{ email }}
|
||||||
|
{% endif %}
|
||||||
|
}
|
||||||
|
|
||||||
{% if "website" in group_names %}
|
{% if "website" in group_names %}
|
||||||
www.{{ domain }} {
|
http://www.{{ domain }} {
|
||||||
root * {{ website_path }}
|
root * {{ website_path }}
|
||||||
file_server
|
file_server
|
||||||
}
|
}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if groups["gitea"] %}
|
{% if groups["gitea"] | length > 0 %}
|
||||||
{{ gitea_domain }} {
|
http://{{ gitea_domain }} {
|
||||||
reverse_proxy {{ groups["gitea"][0] }}:3000
|
reverse_proxy {{ groups["gitea"][0] }}:3000
|
||||||
}
|
}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -3,5 +3,5 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
git -C /home/{{ web_username }}/website pull
|
git -C /home/{{ website_username }}/website pull
|
||||||
make -C /home/{{ web_username }}/website build
|
make -C /home/{{ website_username }}/website build
|
||||||
|
Loading…
Reference in New Issue
Block a user