Advertisement
Guest User

Untitled

a guest
Apr 30th, 2014
262
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. test_jinja_stuff:
  2. file:
  3. - managed
  4. - name: /tmp/test_jinja.txt
  5. - contents: |
  6. {%- set isLocal = "false" -%}
  7. {% for ip in salt['grains.get']('ipv4') if ip.startswith('10.255.255') -%}
  8. {%- set isLocal = "true" -%}
  9. {% endfor %}
  10.  
  11. {% if isLocal == "true" %}
  12. - env.development
  13. {% else %}
  14. - env.production
  15. {%- endif %}
  16.  
  17.  
  18.  
  19. ends in
  20.  
  21.  
  22. [root@web_server tmp]# salt-call state.sls test
  23. [INFO ] Loading fresh modules for state activity
  24. local:
  25. Data failed to compile:
  26. ----------
  27. Too many functions declared in state "file" in sls test
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement