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

93 行
2.1KB

  1. {%- from "salt/map.jinja" import master with context %}
  2. {%- from "linux/map.jinja" import system with context %}
  3. worker_threads: {{ master.worker_threads }}
  4. timeout: {{ master.command_timeout }}
  5. state_output: {{ master.get('state_output', 'changes') }}
  6. {%- if master.system is defined %}
  7. file_roots:
  8. base:
  9. - {{ master.dir.files }}/{{ master.system.environment }}
  10. {%- for formula_name, formula in master.system.get('formula', {}).iteritems() %}
  11. - {{ master.dir.files }}/{{ master.system.environment }}/{{ formula_name }}
  12. {%- endfor %}
  13. {{ master.system.environment }}:
  14. - {{ master.dir.files }}/{{ master.system.environment }}
  15. {%- for formula_name, formula in master.system.get('formula', {}).iteritems() %}
  16. - {{ master.dir.files }}/{{ master.system.environment }}/{{ formula_name }}
  17. {%- endfor %}
  18. {%- else %}
  19. file_roots:
  20. {%- for environment_name, environment in master.get('environment', {}).iteritems() %}
  21. {%- if master.base_environment == environment_name %}
  22. base:
  23. - {{ master.dir.files }}/{{ environment_name }}
  24. {%- endif %}
  25. {{ environment_name }}:
  26. - {{ master.dir.files }}/{{ environment_name }}
  27. {%- endfor %}
  28. {%- endif %}
  29. pillar_opts: False
  30. {%- if master.accept_policy == 'open_mode' %}
  31. open_mode: True
  32. {%- endif %}
  33. {%- if master.accept_policy == 'auto_accept' %}
  34. auto_accept: True
  35. {%- endif %}
  36. {%- if master.get('max_event_size') %}
  37. max_event_size: {{ master.max_event_size }}
  38. {%- endif %}
  39. {%- if master.pillar.engine == 'salt' %}
  40. pillar_roots:
  41. base:
  42. - /srv/salt/pillar
  43. {%- endif %}
  44. {%- if master.pillar.engine == 'reclass' %}
  45. reclass: &reclass
  46. storage_type: yaml_fs
  47. inventory_base_uri: /srv/salt/reclass
  48. ext_pillar:
  49. - reclass: *reclass
  50. master_tops:
  51. reclass: *reclass
  52. {%- endif %}
  53. {%- for handler in pillar.salt.minion.get("handlers", []) %}
  54. {%- if handler.engine == "udp"%}
  55. logstash_udp_handler:
  56. host: {{ handler.host }}
  57. port: {{ handler.port }}
  58. version: 1
  59. {%- endif %}
  60. {%- if handler.engine == "zmq"%}
  61. logstash_zmq_handler:
  62. address: tcp://{{ handler.host }}:{{ handler.port }}
  63. version: 1
  64. {%- endif %}
  65. {%- endfor %}
  66. {%- if master.get('order_masters', False) %}
  67. order_masters: True
  68. {%- endif %}