New version of salt-formula from Saltstack
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.

пре 9 година
пре 9 година
пре 9 година
пре 9 година
пре 9 година
пре 9 година
пре 9 година
пре 9 година
пре 8 година
пре 9 година
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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.pillar.engine == 'salt' %}
  37. pillar_roots:
  38. base:
  39. - /srv/salt/pillar
  40. {%- endif %}
  41. {%- if master.pillar.engine == 'reclass' %}
  42. reclass: &reclass
  43. storage_type: yaml_fs
  44. inventory_base_uri: /srv/salt/reclass
  45. ext_pillar:
  46. - reclass: *reclass
  47. master_tops:
  48. reclass: *reclass
  49. {%- endif %}
  50. {%- for handler in pillar.salt.minion.get("handlers", []) %}
  51. {%- if handler.engine == "udp"%}
  52. logstash_udp_handler:
  53. host: {{ handler.host }}
  54. port: {{ handler.port }}
  55. version: 1
  56. {%- endif %}
  57. {%- if handler.engine == "zmq"%}
  58. logstash_zmq_handler:
  59. address: tcp://{{ handler.host }}:{{ handler.port }}
  60. version: 1
  61. {%- endif %}
  62. {%- endfor %}
  63. {%- if master.get('order_masters', False) %}
  64. order_masters: True
  65. {%- endif %}