mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-12-08 18:35:11 +00:00
53 lines
1.5 KiB
YAML
53 lines
1.5 KiB
YAML
- name: "cleanup (if enabled)"
|
|
include_tasks: 02_cleanup.yml
|
|
when: >
|
|
MODE_CLEANUP | bool or
|
|
MODE_RESET | bool
|
|
|
|
- name: "reset (if enabled) for {{ role_name}}"
|
|
include_tasks: 03_reset.yml
|
|
when: MODE_RESET | bool
|
|
|
|
- name: "Load variables from {{ DOCKER_VARS_FILE }} for {{ role_name }}/{{ application_id }}"
|
|
include_vars: "{{ DOCKER_VARS_FILE }}"
|
|
|
|
- name: "Load docker compose & openresty handlers"
|
|
include_tasks: "{{ [ playbook_dir, 'tasks/utils/load_handlers.yml' ] | path_join }}"
|
|
loop:
|
|
- docker-compose
|
|
- svc-prx-openresty
|
|
loop_control:
|
|
loop_var: handler_role_name
|
|
|
|
- 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: restart openresty
|
|
|
|
- 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
|
|
when: run_once_svc_prx_openresty is not defined
|
|
|
|
- name: Include health dependencies
|
|
include_role:
|
|
name: "{{ item }}"
|
|
loop:
|
|
- sys-ctl-hlth-webserver
|
|
- sys-ctl-hlth-csp
|
|
|
|
- meta: flush_handlers
|
|
|
|
- include_tasks: utils/once/flag.yml
|