Skip to content

Commit

Permalink
enables use of jinja < 2.6
Browse files Browse the repository at this point in the history
Commit 2b51a6f introduced options for gitfs_remotes in a pillar by using a jinja test to see if a parameter is a mapping (dict etc.). This feature however is only available in jinja 2.6 or newer (see http://jinja.pocoo.org/docs/dev/templates/#mapping).
Although this version of Jinja is available on Ubuntu, other OS / package managers do provide older versions (2.2.1 in RedHat 6).

This change makes use of the "iterable" test which should do the exact same thing.
  • Loading branch information
Marvin Frick committed Nov 9, 2014
1 parent a822738 commit 868854c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion salt/files/master.d/_defaults.conf
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ fileserver_backend:
{% if 'gitfs_remotes' in master -%}
gitfs_remotes:
{%- for remote in master['gitfs_remotes'] %}
{% if remote is mapping %}
{% if remote is iterable %}
{%- for repo, children in remote.iteritems() -%}
- {{ repo }}:
{%- for child in children %}
Expand Down

0 comments on commit 868854c

Please sign in to comment.