Saltstack Official Syslog-NG Formula
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

123456789101112131415161718192021222324252627
  1. # -*- coding: utf-8 -*-
  2. # vim: ft=jinja
  3. {%- macro rule_builder(rule) -%}
  4. {%- if rule is none -%}
  5. {%- elif rule is sameas true -%}
  6. yes
  7. {%- elif rule is sameas false -%}
  8. no
  9. {%- elif rule is number -%}
  10. {{ rule }}
  11. {%- elif rule is mapping -%}
  12. {%- for k, v in rule.items() -%}
  13. {{ k }}({{ rule_builder(v) }})
  14. {%- endfor -%}
  15. {%- elif rule is iterable and rule is not string -%}
  16. {%- for v in rule -%}
  17. {{ rule_builder(v) }}
  18. {%- endfor -%}
  19. {%- else -%}
  20. {%- if rule[0] == '=' -%}
  21. {{ rule[1:] }}
  22. {%- else -%}
  23. "{{ rule }}"
  24. {%- endif -%}
  25. {%- endif -%}
  26. {%- endmacro -%}