Saltstack Official PHP Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
1.0KB

  1. {%- macro php_block(config) %}
  2. {% for sections in config %}
  3. {%- for section, settings in sections.items() -%}
  4. {%- if settings is number or settings is string %}
  5. {{ section }} = {{ settings }}
  6. {%- else %}
  7. [{{ section }}]
  8. {%- for setting in settings -%}
  9. {%- for key, value in setting.items() %}
  10. {%- if value is number or value is string %}
  11. {{ key }} = {{ value }}
  12. {%- elif value is iterable -%}
  13. {%- if key == 'error_reporting' %}
  14. {{ key }} = {{ value|join(" & ") }}
  15. {%- else %}
  16. {{ key }} = {{ value|join(",") }}
  17. {%- endif -%}
  18. {%- endif -%}
  19. {%- endfor -%}
  20. {%- endfor -%}
  21. {%- endif -%}
  22. {%- endfor -%}
  23. {% endfor %}
  24. {%- endmacro -%}
  25. ; PHP configuration file.
  26. ;
  27. ; **** DO NOT EDIT THIS FILE ****
  28. ;
  29. ; This file is managed by Salt via {{ source }}
  30. {{ php_block(config) }}