Add nginx crtkeypair macro

For use in nginx pillars.

Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
This commit is contained in:
Georg Pfuetzenreuter 2023-02-05 10:04:09 +01:00
parent 3f2b8d2ee7
commit 4581bd4a6a
Signed by: Georg
GPG Key ID: 1ED2F138E7E6FF57
2 changed files with 9 additions and 0 deletions

View File

@ -24,3 +24,9 @@
interfaces: {{ interfaces }}
{%- endif -%}
{%- endmacro -%}
{%- macro nginx_crtkeypair(name, ssldir) -%}
tls_{{ name }}:
- ssl_certificate: {{ sslbase }}/{{ ssldir }}/crt
- ssl_certificate_key: {{ sslbase }}/{{ ssldir }}/key
{%- endmacro -%}

View File

@ -1,6 +1,9 @@
{%- set sslbase = '/etc/ssl' -%}
{%- from 'macros.jinja' import nginx_crtkeypair with context -%}
{%- from 'macros.jinja' import firewall_interfaces, listeners -%}
{%- set firewall_interfaces = firewall_interfaces -%}
{%- set listeners = listeners -%}
{%- set nginx_crtkeypair = nginx_crtkeypair -%}
{%- set minion = grains['id'] -%}
{#- START Listener detection logic -#}