Skip to content

Commit 4edd99f

Browse files
committed
refactor(import): uniformize map.jinja imports
This is already done mostly everywhere and covers few remaining locations.
1 parent 66f4ea7 commit 4edd99f

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

nginx/certificates.sls

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
{% from 'nginx/map.jinja' import nginx with context %}
1+
{%- set tplroot = tpldir.split('/')[0] %}
2+
{%- from tplroot ~ '/map.jinja' import nginx with context %}
23
34
include:
45
- nginx.service

nginx/init.sls

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
#
33
# Meta-state to fully install nginx.
44

5-
{%- from 'nginx/map.jinja' import nginx, sls_block with context %}
5+
{%- set tplroot = tpldir.split('/')[0] %}
6+
{%- from tplroot ~ '/map.jinja' import nginx with context %}
67
78
include:
89
{%- if nginx.ng is defined %}

nginx/pkg.sls

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
#
33
# Manages installation of nginx from pkg.
44

5-
{% from 'nginx/map.jinja' import nginx, sls_block with context %}
5+
{%- set tplroot = tpldir.split('/')[0] %}
6+
{%- from tplroot ~ '/map.jinja' import nginx, sls_block with context %}
67
{%- if nginx.install_from_repo %}
78
{% set from_official = true %}
89
{% set from_ppa = false %}

nginx/src.sls

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
#
33
# Manages installation of nginx from source.
44

5-
{% from 'nginx/map.jinja' import nginx, sls_block with context %}
5+
{%- set tplroot = tpldir.split('/')[0] %}
6+
{%- from tplroot ~ '/map.jinja' import nginx, sls_block with context %}
67
78
nginx_deps:
89
pkg.installed:

0 commit comments

Comments
 (0)