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

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