Skip to content

Commit

Permalink
Remove mapping test
Browse files Browse the repository at this point in the history
This test isn't available in certain popular versions of Jinja (namely the one
installed by default in CentOS 6).
  • Loading branch information
iggy committed Aug 27, 2015
1 parent 4c4ace6 commit 9779609
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions salt/formulas.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@
{%- 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])) -%}
{%- if value is mapping -%}
{{ value|yaml }}
{%- else -%}
{{ value }}
{%- endif -%}
{%- endmacro -%}

{%- macro formulas_roots(env) -%}
Expand Down

1 comment on commit 9779609

@aboe76
Copy link
Member

@aboe76 aboe76 commented on 9779609 Aug 31, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't it be {{ value }} because I get an error about mapping in

local:
    Data failed to compile:
----------
    Rendering SLS 'base:salt.formulas' failed: mapping values are not allowed here; line 18

---
[...]

# Setup the directory hosting the Git repository


/srv/formulas
...:    <======================
  file.directory:
    - makedirs: True
    - group: root
    - user: root
    - mode: 755
[...]

And if I remove the |yaml part it works.??

Please sign in to comment.