mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 23:08:06 +02:00
- Removed obsolete 'cmp' category, introduced 'stk' category (fa-bars-staggered icon). - Renamed roles: * cmp-db-docker → sys-stk-back-stateful * cmp-docker-oauth2 → sys-stk-back-stateless * srv-domain-provision → sys-stk-front * cmp-db-docker-proxy → sys-stk-full-stateful * cmp-docker-proxy → sys-stk-full-stateless * cmp-rdbms → sys-svc-rdbms - Updated all include_role references, vars, templates and README.md files. - Adjusted run_once comments and variable paths accordingly. - Updated all web-app roles to use new sys-stk/* and sys-svc/* roles. Conversation: https://chatgpt.com/share/68b0ba66-09f8-800f-86fc-76c47009d431
43 lines
1.2 KiB
YAML
43 lines
1.2 KiB
YAML
- block:
|
|
- name: Include dependency 'srv-proxy-core'
|
|
include_role:
|
|
name: srv-proxy-core
|
|
when: run_once_srv_proxy_core is not defined
|
|
- include_tasks: utils/run_once.yml
|
|
when: run_once_sys_stk_front is not defined
|
|
|
|
- include_tasks: "01_cloudflare.yml"
|
|
when: DNS_PROVIDER == "cloudflare"
|
|
|
|
- include_tasks: "{{ playbook_dir }}/tasks/utils/load_handlers.yml"
|
|
vars:
|
|
handler_role_name: "svc-prx-openresty"
|
|
|
|
- name: "include role for {{ domain }} to receive certificates and do the modification routines"
|
|
include_role:
|
|
name: srv-composer
|
|
|
|
- name: "Copy nginx config to {{ configuration_destination }}"
|
|
template:
|
|
src: "{{ vhost_template_src }}"
|
|
dest: "{{ configuration_destination }}"
|
|
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
|