Saltstack Official Nginx Formula
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

server.conf 1.0KB

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