From 150e9f8c0ce6c02d53f320992c4a3b201a8ffaf8 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Sun, 24 Feb 2019 05:40:24 +0000 Subject: [PATCH] feat(pkg): use `require` requisite between `pkg` states * `tpldot` is the equivalent of `tpldir` but using `.` instead of `/`: - https://github.com/saltstack/salt/blob/0c78d7dc894058988d171a28a11bd4a9dbf60266/salt/utils/jinja.py#L120 - https://github.com/saltstack/salt/blob/0c78d7dc894058988d171a28a11bd4a9dbf60266/salt/utils/templates.py#L145 * Implementation based on upstream issue: - https://github.com/saltstack/salt/issues/10838#issuecomment-391718086 --- template/pkg/config.sls | 2 ++ template/pkg/service.sls | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/template/pkg/config.sls b/template/pkg/config.sls index fca83074..83b5db8c 100644 --- a/template/pkg/config.sls +++ b/template/pkg/config.sls @@ -20,3 +20,5 @@ template-config: - user: root - group: root - template: jinja + - require: + - sls: {{ tpldot }}.install diff --git a/template/pkg/service.sls b/template/pkg/service.sls index 56140677..2449736a 100644 --- a/template/pkg/service.sls +++ b/template/pkg/service.sls @@ -6,7 +6,9 @@ include: - .config -template-name: +template-service: service.running: - name: {{ template.service.name }} - enable: True + - require: + - sls: {{ tpldot }}.config