Browse Source

Merge pull request #144 from peterdemin/master

formulas.jinja: python 2.6 support
master
puneet kandhari 9 years ago
parent
commit
4eb6d87870
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      salt/formulas.jinja

+ 3
- 3
salt/formulas.jinja View File

{% set formulas = salt['pillar.get']('salt_formulas:list', {}) %} {% set formulas = salt['pillar.get']('salt_formulas:list', {}) %}


{%- macro formulas_git_opt(env, opt) -%} {%- macro formulas_git_opt(env, opt) -%}
{%- set value = salt['pillar.get']('salt_formulas:git_opts:{}:{}'.format(env, opt),
salt['pillar.get']('salt_formulas:git_opts:default:{}'.format(opt),
{%- set value = salt['pillar.get']('salt_formulas:git_opts:{0}:{1}'.format(env, opt),
salt['pillar.get']('salt_formulas:git_opts:default:{0}'.format(opt),
defaults[opt])) -%} defaults[opt])) -%}
{%- if value is mapping -%} {%- if value is mapping -%}
{{ value|yaml }} {{ value|yaml }}
{%- macro formulas_roots(env) -%} {%- macro formulas_roots(env) -%}
{%- set value = [] -%} {%- set value = [] -%}
{%- for dir in formulas.get(env, []) -%} {%- for dir in formulas.get(env, []) -%}
{%- do value.append('{}/{}'.format(formulas_git_opt(env, 'basedir'), dir)) -%}
{%- do value.append('{0}/{1}'.format(formulas_git_opt(env, 'basedir'), dir)) -%}
{%- endfor -%} {%- endfor -%}
{{ value|yaml }} {{ value|yaml }}
{%- endmacro -%} {%- endmacro -%}

Loading…
Cancel
Save