|
@@ -2,6 +2,9 @@
|
|
# Nginx
|
|
# Nginx
|
|
#
|
|
#
|
|
|
|
|
|
|
|
+include:
|
|
|
|
+ - systemd
|
|
|
|
+
|
|
{% set node_config = salt['pillar.get']('nodes:' ~ grains.id) %}
|
|
{% set node_config = salt['pillar.get']('nodes:' ~ grains.id) %}
|
|
{% set nginx_pkg = node_config.get('nginx:pkg', 'nginx') %}
|
|
{% set nginx_pkg = node_config.get('nginx:pkg', 'nginx') %}
|
|
{% set acme_thumbprint = salt['pillar.get']('acme:thumbprint') %}
|
|
{% set acme_thumbprint = salt['pillar.get']('acme:thumbprint') %}
|
|
@@ -17,6 +20,14 @@ nginx:
|
|
- watch:
|
|
- watch:
|
|
- cmd: nginx-configtest
|
|
- cmd: nginx-configtest
|
|
|
|
|
|
|
|
+# Add dependecy on network-online.target
|
|
|
|
+/etc/systemd/system/nginx.service.d/override.conf:
|
|
|
|
+ file.managed:
|
|
|
|
+ - makedirs: true
|
|
|
|
+ - source: salt://nginx/service-override.conf
|
|
|
|
+ - watch_in:
|
|
|
|
+ - cmd: systemctl-daemon-reload
|
|
|
|
+
|
|
# Add cache directory
|
|
# Add cache directory
|
|
nginx-cache:
|
|
nginx-cache:
|
|
file.directory:
|
|
file.directory:
|