Wrapped in block to avoid multiple similar when conditions for 7-4 web core

This commit is contained in:
Kevin Veen-Birkenbach 2025-08-08 12:25:09 +02:00
parent 14f07adc9d
commit e675aa5886
No known key found for this signature in database
GPG Key ID: 44D8F11FD62F878E
3 changed files with 52 additions and 56 deletions

View File

@ -1,15 +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
when: run_once_srv_web_core is not defined
- name: "reset (if enabled)"
include_tasks: reset.yml
when: mode_reset | bool and run_once_srv_web_core is not defined
include_tasks: 01_reset.yml
when: mode_reset | bool
- name: Ensure nginx configuration directories are present
file:
@ -25,7 +25,6 @@
( nginx.directories.http.values() | list ) +
[ nginx.directories.streams ]
}}
when: run_once_srv_web_core is not defined
- name: Ensure nginx data storage directories are present
file:
@ -37,21 +36,18 @@
mode: '0755'
loop: >
{{ nginx.directories.data.values() | list }}
when: run_once_srv_web_core is not defined
- name: "Include tasks to create cache directories"
include_tasks: cache_directories.yml
include_tasks: 02_cache_directories.yml
- name: create nginx config file
template:
src: nginx.conf.j2
dest: "{{ nginx.files.configuration }}"
notify: restart openresty
when: run_once_srv_web_core is not defined
- name: flush nginx service
meta: flush_handlers
when: run_once_srv_web_core is not defined
- name: run {{ role_name }} once
set_fact: