Saltstack Official Nginx Formula
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

30 行
933B

  1. {% set indent_increment = 4 %}
  2. {%- macro nginx_block(value, key=None, operator=' ', delim=';', ind=0) -%}
  3. {%- if value is number or value is string -%}
  4. {{ key|indent(ind, True) }}{{ operator }}{{ value }}{{ delim }}
  5. {%- elif value is mapping -%}
  6. {{ key|indent(ind, True) }}{{ operator }}{{ '{' }}
  7. {%- for k, v in value.items() %}
  8. {{ nginx_block(v, k, operator, delim, (ind + indent_increment)) }}
  9. {%- endfor %}
  10. {{ '}'|indent(ind, True) }}
  11. {%- elif value is iterable -%}
  12. {%- for v in value %}
  13. {{ nginx_block(v, key, operator, delim, ind) }}
  14. {%- endfor -%}
  15. {%- else -%}
  16. {{ key|indent(ind, True) }}{{ operator }}{{ value }}{{ delim }}
  17. {%- endif -%}
  18. {%- endmacro -%}
  19. # Default nginx server configuration
  20. #
  21. # **** DO NOT EDIT THIS FILE ****
  22. #
  23. # This file is managed by Salt.
  24. {% for key, value in config.items() %}
  25. {{ nginx_block(value, key) }}
  26. {%- endfor -%}