Skip to content

Instantly share code, notes, and snippets.

@hemebond
Created July 31, 2019 15:38
Show Gist options
  • Save hemebond/63c9fb3ab110ec718266e4aba5be688a to your computer and use it in GitHub Desktop.
Save hemebond/63c9fb3ab110ec718266e4aba5be688a to your computer and use it in GitHub Desktop.
Sharing data in Pillars
#!jinja|yaml|gpg
{%- macro sjoin(items, sep=joiner(','), suffix='', prefix='') %}
{%- for item in items %}{{ sep() }}{{ prefix }}{{ item }}{{ suffix }}{% endfor %}
{%- endmacro %}
domain: my.example.com
{%- set g = salt['slsutil.renderer'](path='/srv/salt/pillars/' ~ saltenv ~ '/globals.sls') %}
resources.url: https://{{ g.domain }}/resources
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment