Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3948180
D1415.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
5 KB
Referenced Files
None
Subscribers
None
D1415.id.diff
View Options
diff --git a/roles/shellserver/userland-software/web.sls b/roles/shellserver/userland-software/web.sls
--- a/roles/shellserver/userland-software/web.sls
+++ b/roles/shellserver/userland-software/web.sls
@@ -6,25 +6,7 @@
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
-{% from "map.jinja" import dirs, packages with context %}
-
-# -------------------------------------------------------------
-# nginx
-# -------------------------------------------------------------
-
-nginx:
- pkg.installed: []
- service.running:
- - require:
- - pkg: nginx
-
-# -------------------------------------------------------------
-# SSL certificates
-# -------------------------------------------------------------
-
-letsencrypt:
- pkg.installed:
- - name: {{ packages.certbot }}
+{% from "map.jinja" import dirs with context %}
# -------------------------------------------------------------
# Web utilities
diff --git a/roles/webserver-core/init.sls b/roles/webserver-core/init.sls
--- a/roles/webserver-core/init.sls
+++ b/roles/webserver-core/init.sls
@@ -7,5 +7,8 @@
# -------------------------------------------------------------
include:
- - .letsencrypt
+ - .nginx
- .tools
+ {% if 'paas-docker' not in salt['node.get_list']('roles') %}
+ - .letsencrypt
+ {% endif %}
diff --git a/roles/webserver-core/nginx/config.sls b/roles/webserver-core/nginx/config.sls
new file mode 100644
--- /dev/null
+++ b/roles/webserver-core/nginx/config.sls
@@ -0,0 +1,22 @@
+# -------------------------------------------------------------
+# Salt — Webserver core units for all webservers roles
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+{% from "map.jinja" import dirs with context %}
+
+# -------------------------------------------------------------
+# includes folder
+#
+# :: general configuration
+# :: application-specific code
+# -------------------------------------------------------------
+
+webserver_core_nginx_includes:
+ file.recurse:
+ - name: {{ dirs.etc }}/nginx/includes
+ - source: salt://roles/webserver-core/nginx/files/includes
+ - dir_mode: 755
+ - file_mode: 644
diff --git a/roles/webserver-legacy/nginx/files/includes/fastcgi_params b/roles/webserver-core/nginx/files/includes/fastcgi_params
rename from roles/webserver-legacy/nginx/files/includes/fastcgi_params
rename to roles/webserver-core/nginx/files/includes/fastcgi_params
--- a/roles/webserver-legacy/nginx/files/includes/fastcgi_params
+++ b/roles/webserver-core/nginx/files/includes/fastcgi_params
@@ -6,7 +6,7 @@
# Project: Nasqueron
# Description: nginx FastCGI configuration
# License: Trivial work, not eligible for copyright.
-# Source file: roles/webserver-legacy/nginx/files/includes/fastcgi_params
+# Source file: roles/webserver-core/nginx/files/includes/fastcgi_params
# -------------------------------------------------------------
#
# <auto-generated>
diff --git a/roles/webserver-legacy/nginx/files/includes/tls b/roles/webserver-core/nginx/files/includes/tls
rename from roles/webserver-legacy/nginx/files/includes/tls
rename to roles/webserver-core/nginx/files/includes/tls
--- a/roles/webserver-legacy/nginx/files/includes/tls
+++ b/roles/webserver-core/nginx/files/includes/tls
@@ -4,7 +4,7 @@
# Author: Sébastien Santoro aka Dereckson
# Created: 2016-01-05
# License: Trivial work, not eligible for copyright.
-# Source file: roles/webserver-legacy/nginx/files/includes/tls
+# Source file: roles/webserver-core/nginx/files/includes/tls
# -------------------------------------------------------------
listen 443 ssl http2;
diff --git a/roles/webserver-core/init.sls b/roles/webserver-core/nginx/init.sls
copy from roles/webserver-core/init.sls
copy to roles/webserver-core/nginx/init.sls
--- a/roles/webserver-core/init.sls
+++ b/roles/webserver-core/nginx/init.sls
@@ -2,10 +2,8 @@
# Salt — Webserver core units for all webservers roles
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
-# Created: 2017-10-25
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
include:
- - .letsencrypt
- - .tools
+ - .software
diff --git a/roles/webserver-core/init.sls b/roles/webserver-core/nginx/software.sls
copy from roles/webserver-core/init.sls
copy to roles/webserver-core/nginx/software.sls
--- a/roles/webserver-core/init.sls
+++ b/roles/webserver-core/nginx/software.sls
@@ -2,10 +2,8 @@
# Salt — Webserver core units for all webservers roles
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
-# Created: 2017-10-25
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
-include:
- - .letsencrypt
- - .tools
+nginx:
+ pkg.installed
diff --git a/roles/webserver-core/tools/init.sls b/roles/webserver-core/tools/init.sls
--- a/roles/webserver-core/tools/init.sls
+++ b/roles/webserver-core/tools/init.sls
@@ -6,7 +6,18 @@
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
-{% from "map.jinja" import dirs with context %}
+{% from "map.jinja" import dirs, packages with context %}
+
+# -------------------------------------------------------------
+# Dependencies
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+{{ packages.tcl }}:
+ pkg.installed
+
+# -------------------------------------------------------------
+# Salt — Helper tools for nginx
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{{ dirs.bin }}/list-nginx-vhosts-conf:
file.managed:
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 28, 09:56 (7 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2318349
Default Alt Text
D1415.id.diff (5 KB)
Attached To
Mode
D1415: Consolidate nginx installation and common config files
Attached
Detach File
Event Timeline
Log In to Comment