Advertisement
Guest User

Untitled

a guest
Nov 27th, 2013
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ################## jinja file ##############
  2. {% if 'environment' in pillar and 'office' in pillar['environment'] %}
  3. {% set jinjamap = salt['grains.filter_by']({
  4. 'Debian': {
  5. 'k': 'v',
  6. },
  7. 'CentOS': {
  8. 'k': 'v',
  9. 'nameservers': {
  10. '0': '192.168.0.218',
  11. '1': '192.168.0.121',
  12.  
  13. },
  14. 'nameservers2':
  15. - '192.168.0.218'
  16. - '192.168.0.121'
  17. ,
  18.  
  19. },
  20. }, grain='os', merge=salt['pillar.get']('test:lookup')) %}
  21. {% endif %} {#end environment #}
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30. ######################## CONF file (generated from jinja)
  31. {%- for value in jinjamap.nameservers2 %}
  32. nameserver {{ value -}}
  33. {% endfor %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement