-
-
Save whytewolf/ff4e7acd721577a9dfc57236245365e6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# These are our default values for use in states and templates | |
# # map.jinja merges them any overrides on top of this | |
user: zookeeper | |
group: zookeeper | |
basedir: /opt/zookeeper | |
version: 3.4.8 | |
datadir: /opt/data/zookeeper | |
clustered: False | |
# # The below is only parsed if clustered == True, there are no defaults | |
# # that make sense. Eventually salt mine should be used here! | |
# #servers: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use an external defaults file for our settings so we don't repeat ourselves | |
{% from "testing/map.jinja" import zookeeper with context %} | |
{{zookeeper}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{## Start with our default settings ##} | |
{% import_yaml "testing/defaults.yaml" as default_settings %} | |
{## Merge our overrides into the defaults ##} | |
{% set zookeeper = salt['pillar.get'] ( | |
'zookeeper', | |
default=default_settings, | |
merge=True) | |
%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@salt01 testing]# salt 'salt01*' debug.render template=jinja source=salt://testing/map.jinja | |
salt01.wolfcloud.bad4.us: | |
[root@salt01 testing]# salt 'salt01*' debug.render template=jinja source=salt://testing/install.sls | |
salt01.wolfcloud.bad4.us: | |
# Use an external defaults file for our settings so we don't repeat ourselves | |
{'datadir': '/opt/data/zookeeper', 'version': '3.4.9', 'group': 'zookeeper', 'user': 'zookeeper', 'clustered': False, 'basedir': '/opt/zookeeper'} | |
[root@salt01 testing]# |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment