Saltstack Official Apt 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.

31 lines
690B

  1. {%- macro print(mname, mvalue) %}
  2. {%- if mvalue is string %}
  3. {{ mname }} "{{ mvalue }}";
  4. {%- elif mvalue is sequence %}
  5. {{ mname }} {
  6. {%- for item in mvalue %}
  7. "{{ item }}";
  8. {%- endfor %}
  9. };
  10. {%- endif %}
  11. {%- endmacro -%}
  12. // This file is managed by salt
  13. {%- for opt, opt_data in data|dictsort -%}
  14. {%- if opt_data is string or opt_data is number %}
  15. {{ opt }} "{{ opt_data }}";
  16. {%- elif opt_data is mapping %}
  17. {{ opt }}
  18. {
  19. {%- for name, value in opt_data|dictsort %}
  20. {{- print(name, value) }}
  21. {%- endfor %}
  22. };
  23. {%- elif opt_data is sequence %}
  24. {{ opt }} {
  25. {%- for item in opt_data %}
  26. "{{ item }}";
  27. {%- endfor %}
  28. };
  29. {%- endif %}
  30. {%- endfor -%}