mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-30 23:38:13 +02:00
Renamed webserver roles to more speakable names
This commit is contained in:
49
roles/srv-core/tasks/01_core.yml
Normal file
49
roles/srv-core/tasks/01_core.yml
Normal file
@@ -0,0 +1,49 @@
|
||||
- name: "cleanup (if enabled)"
|
||||
include_tasks: 02_cleanup.yml
|
||||
when: >
|
||||
MODE_CLEANUP | bool or
|
||||
MODE_RESET | bool
|
||||
|
||||
- name: "reset (if enabled)"
|
||||
include_tasks: 03_reset.yml
|
||||
when: MODE_RESET | bool
|
||||
|
||||
- name: "Load docker compose handlers"
|
||||
include_tasks: "{{ playbook_dir }}/tasks/utils/load_handlers.yml"
|
||||
vars:
|
||||
handler_role_name: "docker-compose"
|
||||
|
||||
- name: "Include tasks to create directories"
|
||||
include_tasks: 04_directories.yml
|
||||
|
||||
- name: create nginx config file
|
||||
template:
|
||||
src: nginx.conf.j2
|
||||
dest: "{{ NGINX.FILES.CONFIGURATION }}"
|
||||
notify: docker compose up
|
||||
|
||||
- name: Include health dependencies
|
||||
include_role:
|
||||
name: "{{ item }}"
|
||||
loop:
|
||||
- sys-ctl-hlth-webserver
|
||||
- sys-ctl-hlth-csp
|
||||
vars:
|
||||
# Extra flush is for performance reasons not necessary
|
||||
flush_handlers: false
|
||||
|
||||
- name: Include openresty
|
||||
# Outside of run_once block is necessary for handler loading
|
||||
# Otherwise the when: condition from the block is added to the handlers
|
||||
# Inside openresty their is a validation that it doesn't run multiple times
|
||||
include_role:
|
||||
name: svc-prx-openresty
|
||||
|
||||
# Explicit set to guaranty that application_id will not be overwritten.
|
||||
# Should be anyhow the default case
|
||||
public: false
|
||||
|
||||
vars:
|
||||
# Flush openresty handler on first run, so that openresty is up, before openresty related handlers are triggered
|
||||
flush_handlers: true
|
||||
when: run_once_svc_prx_openresty is not defined
|
Reference in New Issue
Block a user