mirror of
https://github.com/saltstack-formulas/template-formula.git
synced 2025-04-10 23:01:43 +00:00
commit
9bd10044b8
2 changed files with 11 additions and 6 deletions
|
@ -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
template/map.jinja
Normal file
7
template/map.jinja
Normal file
|
@ -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')) %}
|
Loading…
Add table
Reference in a new issue