Skip to content

Commit c21f82b

Browse files
committed
refactor(pkg): move pkg related components into separate directory
1 parent be780db commit c21f82b

File tree

5 files changed

+14
-9
lines changed

5 files changed

+14
-9
lines changed

template/init.sls

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,4 @@
22
# vim: ft=sls
33

44
include:
5-
- template.install
6-
- template.config
7-
- template.service
5+
- template.pkg

template/config.sls renamed to template/pkg/config.sls

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
# vim: ft=sls
33

44
{%- set topdir = tpldir.split('/')[0] %}
5-
{%- from tpldir ~ "/map.jinja" import template with context %}
6-
{%- from tpldir ~ "/macros.jinja" import files_switch with context %}
5+
{%- from salt['file.dirname'](tpldir) ~ "/map.jinja" import template with context %}
6+
{%- from salt['file.dirname'](tpldir) ~ "/macros.jinja" import files_switch with context %}
77
88
include:
9-
- template.install
9+
- .install
1010
1111
template-config:
1212
file.managed:

template/pkg/init.sls

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# -*- coding: utf-8 -*-
2+
# vim: ft=sls
3+
4+
include:
5+
- .install
6+
- .config
7+
- .service

template/install.sls renamed to template/pkg/install.sls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8 -*-
22
# vim: ft=sls
33

4-
{%- from tpldir ~ "/map.jinja" import template with context %}
4+
{%- from salt['file.dirname'](tpldir) ~ "/map.jinja" import template with context %}
55
66
template-pkg:
77
pkg.installed:

template/service.sls renamed to template/pkg/service.sls

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# -*- coding: utf-8 -*-
22
# vim: ft=sls
33

4-
{%- from tpldir ~ "/map.jinja" import template with context %}
4+
{%- from salt['file.dirname'](tpldir) ~ "/map.jinja" import template with context %}
55
66
include:
7-
- template.config
7+
- .config
88
99
template-name:
1010
service.running:

0 commit comments

Comments
 (0)