Skip to content

Instantly share code, notes, and snippets.

@emilisto
Created July 18, 2013 13:38
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 emilisto/6029357 to your computer and use it in GitHub Desktop.
Save emilisto/6029357 to your computer and use it in GitHub Desktop.
## lib.sls
# Shorthand macro for getting pillar data
{% macro p(key, default='') -%}
{{ salt['pillar.get'](key, default) }}
{%- endmacro %}
## Usage
{% from 'lib.sls' import p with context %}
{{ p('git:url', 'git@github.com') }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment