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,59 +1,55 @@
|
|||||||
---
|
---
|
||||||
- name: Include openresty
|
- block:
|
||||||
include_role:
|
- name: Include openresty
|
||||||
name: svc-prx-openresty
|
include_role:
|
||||||
public: false
|
name: svc-prx-openresty
|
||||||
# Explicit set to guaranty that application_id will not be overwritten.
|
public: false
|
||||||
# Should be anyhow the default case
|
# Explicit set to guaranty that application_id will not be overwritten.
|
||||||
when: run_once_srv_web_core is not defined
|
# Should be anyhow the default case
|
||||||
|
|
||||||
- name: "reset (if enabled)"
|
|
||||||
include_tasks: reset.yml
|
|
||||||
when: mode_reset | bool and run_once_srv_web_core is not defined
|
|
||||||
|
|
||||||
- name: Ensure nginx configuration directories are present
|
- name: "reset (if enabled)"
|
||||||
file:
|
include_tasks: 01_reset.yml
|
||||||
path: "{{ item }}"
|
when: mode_reset | bool
|
||||||
state: directory
|
|
||||||
owner: "{{nginx.user}}"
|
- name: Ensure nginx configuration directories are present
|
||||||
group: "{{nginx.user}}"
|
file:
|
||||||
mode: '0755'
|
path: "{{ item }}"
|
||||||
recurse: yes
|
state: directory
|
||||||
loop: >
|
owner: "{{nginx.user}}"
|
||||||
{{
|
group: "{{nginx.user}}"
|
||||||
[ nginx.directories.configuration ] +
|
mode: '0755'
|
||||||
(nginx.directories.http.values() | list) +
|
recurse: yes
|
||||||
[ nginx.directories.streams ]
|
loop: >
|
||||||
}}
|
{{
|
||||||
when: run_once_srv_web_core is not defined
|
[ nginx.directories.configuration ] +
|
||||||
|
( nginx.directories.http.values() | list ) +
|
||||||
- name: Ensure nginx data storage directories are present
|
[ nginx.directories.streams ]
|
||||||
file:
|
}}
|
||||||
path: "{{ item }}"
|
|
||||||
state: directory
|
- name: Ensure nginx data storage directories are present
|
||||||
recurse: yes
|
file:
|
||||||
owner: "{{nginx.user}}"
|
path: "{{ item }}"
|
||||||
group: "{{nginx.user}}"
|
state: directory
|
||||||
mode: '0755'
|
recurse: yes
|
||||||
loop: >
|
owner: "{{nginx.user}}"
|
||||||
{{ nginx.directories.data.values() | list }}
|
group: "{{nginx.user}}"
|
||||||
when: run_once_srv_web_core is not defined
|
mode: '0755'
|
||||||
|
loop: >
|
||||||
- name: "Include tasks to create cache directories"
|
{{ nginx.directories.data.values() | list }}
|
||||||
include_tasks: cache_directories.yml
|
|
||||||
|
- name: "Include tasks to create cache directories"
|
||||||
- name: create nginx config file
|
include_tasks: 02_cache_directories.yml
|
||||||
template:
|
|
||||||
src: nginx.conf.j2
|
- name: create nginx config file
|
||||||
dest: "{{ nginx.files.configuration }}"
|
template:
|
||||||
notify: restart openresty
|
src: nginx.conf.j2
|
||||||
when: run_once_srv_web_core is not defined
|
dest: "{{ nginx.files.configuration }}"
|
||||||
|
notify: restart openresty
|
||||||
- name: flush nginx service
|
|
||||||
meta: flush_handlers
|
- name: flush nginx service
|
||||||
when: run_once_srv_web_core is not defined
|
meta: flush_handlers
|
||||||
|
|
||||||
- name: run {{ role_name }} once
|
- name: run {{ role_name }} once
|
||||||
set_fact:
|
set_fact:
|
||||||
run_once_srv_web_core: true
|
run_once_srv_web_core: true
|
||||||
when: run_once_srv_web_core is not defined
|
when: run_once_srv_web_core is not defined
|
||||||
|
Loading…
x
Reference in New Issue
Block a user