New version of salt-formula from Saltstack
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

vor 9 Jahren
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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. - /srv/salt/env/{{ master.system.environment }}
  9. {%- for formula_name, formula in master.system.get('formula', {}).iteritems() %}
  10. - /srv/salt/env/{{ master.system.environment }}/{{ formula_name }}
  11. {%- endfor %}
  12. {{ master.system.environment }}:
  13. - /srv/salt/env/{{ master.system.environment }}
  14. {%- for formula_name, formula in master.system.get('formula', {}).iteritems() %}
  15. - /srv/salt/env/{{ 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. - /srv/salt/env/{{ environment_name }}
  23. {%- endif %}
  24. {{ environment_name }}:
  25. - /srv/salt/env/{{ 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. {%- if master.acl is defined %}
  50. client_acl:
  51. {%- for acl in master.acl %}
  52. {{ acl.name }}:
  53. {%- for right in acl.rights %}
  54. - {{ right }}
  55. {%- endfor %}
  56. {%- endfor %}
  57. {%- endif %}
  58. {%- if master.bind.api is defined %}
  59. rest_cherrypy:
  60. port: {{ master.api.port }}
  61. ssl_crt: /etc/ssl/certs/{{ system.name }}.{{ system.domain }}.crt
  62. ssl_key: /etc/ssl/private/{{ system.name }}.{{ system.domain }}.key
  63. {%- if pillar.halite is defined %}
  64. static: /srv/halite/halite
  65. app: /srv/halite/halite/index.html
  66. {%- endif %}
  67. debug: True
  68. {%- endif %}
  69. {%- for handler in pillar.salt.minion.get("handlers", []) %}
  70. {%- if handler.engine == "udp"%}
  71. logstash_udp_handler:
  72. host: {{ handler.host }}
  73. port: {{ handler.port }}
  74. version: 1
  75. {%- endif %}
  76. {%- if handler.engine == "zmq"%}
  77. logstash_zmq_handler:
  78. address: tcp://{{ handler.host }}:{{ handler.port }}
  79. version: 1
  80. {%- endif %}
  81. {%- endfor %}
  82. {%- if master.syndic is defined %}
  83. {% if master.syndic.mode == 'master' %}
  84. order_masters: True
  85. {%- endif %}
  86. {% if master.syndic.mode == 'client' %}
  87. syndic_master: {{ master.syndic.host }}
  88. {%- endif %}
  89. {%- endif %}