File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 11{%- set tplroot = tpldir.split(' /' )[0 ] %}
2- {%- from tplroot ~ ' /map.jinja' import nginx with context % }
2+ {%- from tplroot ~ ' /map.jinja' import nginx, pillar_namespace with context % }
33
44include:
55 - {{ tplroot }}.service
@@ -14,7 +14,7 @@ prepare_certificates_path_dir:
1414create_nginx_dhparam_{{ dh_param }}_key:
1515 file .managed:
1616 - name: {{ nginx.certificates_path }}/ {{ dh_param }}
17- - contents_pillar: nginx :dh_param:{{ dh_param }}
17+ - contents_pillar: {{ pillar_namespace }} :dh_param:{{ dh_param }}
1818 - makedirs: True
1919 - require:
2020 - file : prepare_certificates_path_dir
@@ -44,7 +44,7 @@ nginx_{{ domain }}_ssl_certificate:
4444{% if domain in nginx.certificates and ' public_cert_pillar' in nginx.certificates[domain] % }
4545 - contents_pillar: {{ nginx.certificates[domain].public_cert_pillar }}
4646{% else % }
47- - contents_pillar: nginx :certificates:{{ domain }}:public_cert
47+ - contents_pillar: {{ pillar_namespace }} :certificates:{{ domain }}:public_cert
4848{% endif % }
4949 - watch_in:
5050 - service: nginx_service
@@ -58,7 +58,7 @@ nginx_{{ domain }}_ssl_key:
5858{% if ' private_key_pillar' in nginx.certificates[domain] % }
5959 - contents_pillar: {{ nginx.certificates[domain].private_key_pillar }}
6060{% else % }
61- - contents_pillar: nginx :certificates:{{ domain }}:private_key
61+ - contents_pillar: {{ pillar_namespace }} :certificates:{{ domain }}:private_key
6262{% endif % }
6363 - watch_in:
6464 - service: nginx_service
Original file line number Diff line number Diff line change 44 {% endfor %}
55{% endmacro %}
66
7- {% set nginx = salt ['pillar.get' ]('nginx' , {
7+ {% - set tplroot = tpldir .split ('/' )[0] %}
8+ {% set pillar_namespace = salt ['pillar.get' ]('{}:pillar:namespace' .format (tplroot ), tplroot ) %}
9+ {% set nginx = salt ['pillar.get' ](pillar_namespace , {
810 'lookup' : salt ['grains.filter_by' ]({
911 'Debian' : {
1012 'package' : 'nginx' ,
You can’t perform that action at this time.
0 commit comments