mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-16 00:47:29 +02:00
Wrapped in block to avoid multiple similar when conditions for 7-4 web core
This commit is contained in:
parent
14f07adc9d
commit
e675aa5886
@ -1,17 +1,17 @@
|
||||
---
|
||||
- name: Include openresty
|
||||
- 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
|
||||
- name: "reset (if enabled)"
|
||||
include_tasks: 01_reset.yml
|
||||
when: mode_reset | bool
|
||||
|
||||
- name: Ensure nginx configuration directories are present
|
||||
- name: Ensure nginx configuration directories are present
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
@ -22,12 +22,11 @@
|
||||
loop: >
|
||||
{{
|
||||
[ nginx.directories.configuration ] +
|
||||
(nginx.directories.http.values() | list) +
|
||||
( 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
|
||||
- name: Ensure nginx data storage directories are present
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
@ -37,23 +36,20 @@
|
||||
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
|
||||
- name: "Include tasks to create cache directories"
|
||||
include_tasks: 02_cache_directories.yml
|
||||
|
||||
- name: create nginx config file
|
||||
- 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
|
||||
- name: flush nginx service
|
||||
meta: flush_handlers
|
||||
when: run_once_srv_web_core is not defined
|
||||
|
||||
- name: run {{ role_name }} once
|
||||
- name: run {{ role_name }} once
|
||||
set_fact:
|
||||
run_once_srv_web_core: true
|
||||
when: run_once_srv_web_core is not defined
|
||||
|
Loading…
x
Reference in New Issue
Block a user