Skip to content

Commit

Permalink
Merge pull request saltstack-formulas#2 from evvers/master
Browse files Browse the repository at this point in the history
Add map.jinja
  • Loading branch information
gravyboat committed Feb 16, 2014
2 parents c0fec43 + 5c18009 commit 9bd1004
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
10 changes: 4 additions & 6 deletions template/init.sls
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
foo-common:
pkg.installed
{% from "template/map.jinja" import template with context %}
{% if grains['id'] == pillar['template']['master'] %}
foo-service:
template:
pkg:
- installed
- name: {{ template.pkg }}
service:
- running
- name: {{ template.service }}
- enable: True

{% endif %}
7 changes: 7 additions & 0 deletions template/map.jinja
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% set template = salt['grains.filter_by']({
'default': {
'pkg': 'template',
'service': 'template',
'config': '/etc/template.conf',
},
}, merge=salt['pillar.get']('template:lookup')) %}

0 comments on commit 9bd1004

Please sign in to comment.