Skip to content

Instantly share code, notes, and snippets.

@emilisto
Created July 18, 2013 13:38
Show Gist options
  • 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', '[email protected]') }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment