Skip to content

Instantly share code, notes, and snippets.

@jab416171
Created April 12, 2016 23:42
Show Gist options
  • Save jab416171/f37c4dd20c8af664884c9c6b4ddedf72 to your computer and use it in GitHub Desktop.
Save jab416171/f37c4dd20c8af664884c9c6b4ddedf72 to your computer and use it in GitHub Desktop.
{%- set salt_path = [] %}
{%- for master in ('salt01.example.com', 'salt02.example.com', 'salt03.example.com') %}
{%- if master in grains['master'] %}
{%- do salt_path.append('saltstack-staging') %}
{%- else %}
{%- do salt_path.append('saltstack') %}
{%- endif %}
{%- endfor %}
{{ salt_path[0] }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment