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

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # -*- coding: utf-8 -*-
  2. # vim: ft=jinja
  3. {#- Get the `tplroot` from `tpldir` #}
  4. {%- set tplroot = tpldir.split('/')[0] %}
  5. {#- Start imports as #}
  6. {%- import_yaml tplroot ~ "/defaults.yaml" as default_settings %}
  7. {%- import_yaml tplroot ~ "/osarchmap.yaml" as osarchmap %}
  8. {%- import_yaml tplroot ~ "/osfamilymap.yaml" as osfamilymap %}
  9. {%- import_yaml tplroot ~ "/osmap.yaml" as osmap %}
  10. {%- import_yaml tplroot ~ "/osfingermap.yaml" as osfingermap %}
  11. {#- Retrieve the config dict only once #}
  12. {%- set _config = salt['config.get'](tplroot, default={}) %}
  13. {%- set defaults = salt['grains.filter_by'](
  14. default_settings,
  15. default=tplroot,
  16. merge=salt['grains.filter_by'](
  17. osarchmap,
  18. grain='osarch',
  19. merge=salt['grains.filter_by'](
  20. osfamilymap,
  21. grain='os_family',
  22. merge=salt['grains.filter_by'](
  23. osmap,
  24. grain='os',
  25. merge=salt['grains.filter_by'](
  26. osfingermap,
  27. grain='osfinger',
  28. merge=salt['grains.filter_by'](
  29. _config,
  30. default='lookup'
  31. )
  32. )
  33. )
  34. )
  35. )
  36. )
  37. %}
  38. {%- set config = salt['grains.filter_by'](
  39. {'defaults': defaults},
  40. default='defaults',
  41. merge=_config
  42. )
  43. %}
  44. {%- set syslog_ng = config %}