Normalized run_once_, made openresty handlers without when aviable and forced flush in run_once when blocks to avoid handlers with when conditions

This commit is contained in:
2025-08-08 15:32:26 +02:00
parent e675aa5886
commit c7b25ed093
58 changed files with 410 additions and 293 deletions

View File

@@ -1,12 +1,15 @@
---
- block:
- name: Include openresty
include_role:
name: svc-prx-openresty
public: false
# Explicit set to guaranty that application_id will not be overwritten.
# Should be anyhow the default case
- 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
public: false
# Explicit set to guaranty that application_id will not be overwritten.
# Should be anyhow the default case
- block:
- name: "reset (if enabled)"
include_tasks: 01_reset.yml
when: mode_reset | bool
@@ -51,5 +54,5 @@
- name: run {{ role_name }} once
set_fact:
run_once_srv_web_core: true
when: run_once_srv_web_core is not defined
run_once_srv_web_7_4_core: true
when: run_once_srv_web_7_4_core is not defined