New version of salt-formula from Saltstack
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

map.jinja 4.2KB

9 lat temu
8 lat temu
8 lat temu
8 lat temu
9 lat temu
9 lat temu
9 lat temu
7 lat temu
7 lat temu
8 lat temu
8 lat temu
8 lat temu
8 lat temu
8 lat temu
8 lat temu
8 lat temu
8 lat temu
8 lat temu
8 lat temu
8 lat temu
8 lat temu
8 lat temu
8 lat temu
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. {%- load_yaml as master_common %}
  2. default:
  3. service: salt-master
  4. {%- if pillar.salt.get('master', {}).get('source', {}).get('engine', 'pkg') == 'pkg' %}
  5. install_state: "pkg: salt_master_packages"
  6. source:
  7. engine: pkg
  8. {%- elif pillar.salt.master.source.engine == 'pip' %}
  9. install_state: "pip: salt_master_packages"
  10. {%- endif %}
  11. {%- if pillar.salt.get('master', {}).get('source', {}).version is defined %}
  12. version: {{ pillar.salt.master.source.version }}
  13. {%- endif %}
  14. accept_policy: preseed
  15. bind: {}
  16. formula: {}
  17. base_environment: dev
  18. dir:
  19. files: /srv/salt/env
  20. pillar_safe_render_error: true
  21. pillar:
  22. engine: salt
  23. max_event_size: 100000000
  24. minion_data_cache: 'localfs'
  25. {%- endload %}
  26. {%- load_yaml as master_specific %}
  27. Arch:
  28. pkgs:
  29. - salt
  30. Debian:
  31. pkgs:
  32. - salt-master
  33. Gentoo:
  34. pkgs:
  35. - app-admin/salt
  36. MacOS:
  37. pkgs:
  38. - saltstack
  39. RedHat:
  40. pkgs:
  41. - salt-master
  42. {%- endload %}
  43. {%- if pillar.salt.master is defined %}
  44. {%- set raw_master = salt['grains.filter_by'](master_specific, merge=salt['pillar.get']('salt:master')) %}
  45. {%- set master = salt['grains.filter_by'](master_common, merge=raw_master) %}
  46. {%- endif %}
  47. {%- load_yaml as syndic_defaults %}
  48. Debian:
  49. service: salt-syndic
  50. pkgs:
  51. - salt-syndic
  52. RedHat:
  53. service: salt-syndic
  54. pkgs:
  55. - salt-syndic
  56. {%- endload %}
  57. {%- set syndic = salt['grains.filter_by'](syndic_defaults, merge=salt['pillar.get']('salt:syndic')) %}
  58. {%- load_yaml as minion_common %}
  59. default:
  60. graph_pkgs:
  61. - graphviz
  62. graph_states_pkgs:
  63. - python-pydot
  64. - python-yaml
  65. graph_states: False
  66. log:
  67. level: info
  68. service: salt-minion
  69. {%- if pillar.salt.get('minion', {}).get('source', {}).get('engine', 'pkg') == 'pkg' %}
  70. install_state: "pkg: salt_minion_packages"
  71. source:
  72. engine: pkg
  73. {%- elif pillar.salt.minion.source.engine == 'pip' %}
  74. install_state: "pip: salt_minion_packages"
  75. {%- endif %}
  76. {%- if pillar.salt.get('minion', {}).get('source', {}).version is defined %}
  77. version: {{ pillar.salt.minion.source.version }}
  78. {%- endif %}
  79. max_event_size: 100000000
  80. {%- endload %}
  81. {%- load_yaml as minion_specific %}
  82. Arch:
  83. pkgs:
  84. - salt
  85. Debian:
  86. pkgs:
  87. - salt-minion
  88. dependency_pkgs:
  89. - python-m2crypto
  90. - python-psutil
  91. - python-yaml
  92. - python-msgpack
  93. - python-oauth
  94. dependency_pkgs_pip:
  95. - PyYAML
  96. - M2Crypto
  97. - psutil
  98. - oauth
  99. cert_pkgs:
  100. - ca-certificates
  101. Gentoo:
  102. pkgs:
  103. - app-admin/salt
  104. MacOS:
  105. pkgs:
  106. - saltstack
  107. RedHat:
  108. pkgs:
  109. - salt-minion
  110. dependency_pkgs:
  111. - m2crypto
  112. - psutils
  113. - PyYAML
  114. - python-oauth
  115. dependency_pkgs_pip:
  116. - PyYAML
  117. - M2Crypto
  118. - psutil
  119. - oauth
  120. cert_pkgs:
  121. - ca-certificates
  122. {%- endload %}
  123. {%- if pillar.salt.minion is defined %}
  124. {%- set raw_minion = salt['grains.filter_by'](minion_specific, merge=salt['pillar.get']('salt:minion')) %}
  125. {%- set minion = salt['grains.filter_by'](minion_common, merge=raw_minion) %}
  126. {%- if pillar.salt.minion.proxy_minion is defined %}
  127. {% set proxy_minion = salt['grains.filter_by']({
  128. 'Debian': {
  129. 'napalm_pkgs': ['python-pip', 'libxml2-dev', 'libxslt1-dev', 'zlib1g-dev'],
  130. 'napalm_pip_pkgs': ['napalm', 'oauth']
  131. },
  132. 'RedHat': {
  133. 'napalm_pkgs': ['libxml2-dev', 'libxslt1-dev', 'zlib1g-dev']
  134. },
  135. }, merge=pillar.salt.minion.get('proxy_minion', {})) %}
  136. {%- endif %}
  137. {%- endif %}
  138. {%- load_yaml as api_common %}
  139. default:
  140. pkgs:
  141. - salt-api
  142. service: salt-api
  143. {%- endload %}
  144. {%- set api = salt['grains.filter_by'](api_common, merge=salt['pillar.get']('salt:api')) %}
  145. {%- load_yaml as control_common %}
  146. default:
  147. cloud_pips:
  148. - apache-libcloud
  149. - netaddr
  150. cloud_pkgs:
  151. - python-netaddr
  152. - python-libcloud
  153. virt_pips:
  154. - libvirt-python
  155. maas_pkgs:
  156. - python-maas-client
  157. cluster: {}
  158. {%- endload %}
  159. {%- load_yaml as control_specific %}
  160. Debian:
  161. virt_pkgs:
  162. - libvirt-dev
  163. - pkg-config
  164. {% if grains.get('oscodename') == 'trusty' %}
  165. - libguestfs-tools
  166. {% endif %}
  167. RedHat:
  168. virt_pkgs:
  169. - libvirt-dev
  170. - pkg-config
  171. {%- endload %}
  172. {%- if pillar.salt.control is defined %}
  173. {%- set raw_control = salt['grains.filter_by'](control_specific, merge=salt['pillar.get']('salt:control')) %}
  174. {%- set control = salt['grains.filter_by'](control_common, merge=raw_control) %}
  175. {%- endif %}