Skip to content

Instantly share code, notes, and snippets.

@tlk2126
Created October 24, 2013 20:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tlk2126/7144719 to your computer and use it in GitHub Desktop.
Save tlk2126/7144719 to your computer and use it in GitHub Desktop.
/some/configuration/file:
file:
- managed
- source: ...
- template: jinja
# Pillar stuff:
db_master:
- master.db.name
db_slaves:
- slave1.db.name
- slave2.db.name
# In configuration file
<configuration content>
{% if opts['id'] in pillar['db_master'] %}
master configuration goes here.
{% endif %}
{% if opts['id'] in pillar['db_slaves'] %}
slave configuration goes here
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment