Files
computer-playbook/roles/sys-stk-front-proxy/tasks/01_base.yml
Kevin Veen-Birkenbach a817d964e4 refactor(front-stack): introduce sys-stk-front-base and semi-stateless stack; improve coturn role docs
- Extract common HTTPS + Cloudflare + handler bootstrap into new role sys-stk-front-base
- Update sys-stk-front-proxy, web-svc-cdn, web-svc-file, web-svc-html to depend on sys-stk-front-base
- Add new sys-stk-semi-stateless role combining front-base + back-stateless
- Update web-svc-coturn to use sys-stk-semi-stateless and rewrite README/meta with detailed Coturn description
- Unify sys-util-csp-cert README heading

Ref: ChatGPT conversation https://chatgpt.com/share/68d6cea2-3570-800f-acb3-c3277317f17b
2025-09-26 20:25:53 +02:00

31 lines
920 B
YAML

- name: Front bootstrap
include_role:
name: sys-stk-front-base
- name: "include role for '{{ domain }}' to receive certificates and do the modification routines"
include_role:
name: sys-util-csp-cert
- name: "Copy nginx config to '{{ FRONT_PROXY_DOMAIN_CONF_DST }}'"
template:
src: "{{ FRONT_PROXY_DOMAIN_CONF_SRC }}"
dest: "{{ FRONT_PROXY_DOMAIN_CONF_DST }}"
register: nginx_conf
notify: restart openresty
- block:
- name: "Check if {{ domains | get_domain(application_id) }} is reachable (only if config unchanged)"
uri:
url: "{{ domains | get_url(application_id, WEB_PROTOCOL) }}"
register: site_check
failed_when: false
changed_when: false
- name: Restart nginx if site is down
command:
cmd: "true"
notify: restart openresty
when:
- site_check.status is defined
- not site_check.status in [200,301,302]
when: not nginx_conf.changed