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 година
пре 8 година
пре 8 година
пре 8 година
пре 9 година
пре 9 година
пре 8 година
пре 9 година
пре 7 година
пре 7 година
пре 8 година
пре 8 година
пре 8 година
пре 8 година
пре 8 година
пре 8 година
пре 8 година
пре 8 година
пре 8 година
пре 8 година
пре 8 година
пре 8 година
пре 8 година
пре 8 година
пре 8 година
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  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. {%- if pillar.salt.minion.env_vars is defined %}
  138. {% set env_vars = salt['grains.filter_by']({
  139. 'Debian': {
  140. 'engine': 'file'
  141. },
  142. 'RedHat': {
  143. 'engine': 'file'
  144. },
  145. }, merge=pillar.salt.minion.get('env_vars', {})) %}
  146. {%- endif %}
  147. {%- endif %}
  148. {%- load_yaml as api_common %}
  149. default:
  150. pkgs:
  151. - salt-api
  152. service: salt-api
  153. {%- endload %}
  154. {%- set api = salt['grains.filter_by'](api_common, merge=salt['pillar.get']('salt:api')) %}
  155. {%- load_yaml as control_common %}
  156. default:
  157. cloud_pips:
  158. - apache-libcloud
  159. - netaddr
  160. cloud_pkgs:
  161. - python-netaddr
  162. - python-libcloud
  163. virt_pips:
  164. - libvirt-python
  165. maas_pkgs:
  166. - python-maas-client
  167. cluster: {}
  168. {%- endload %}
  169. {%- load_yaml as control_specific %}
  170. Debian:
  171. virt_pkgs:
  172. - libvirt-dev
  173. - pkg-config
  174. {% if grains.get('oscodename') == 'trusty' %}
  175. - libguestfs-tools
  176. {% endif %}
  177. RedHat:
  178. virt_pkgs:
  179. - libvirt-dev
  180. - pkg-config
  181. {%- endload %}
  182. {%- if pillar.salt.control is defined %}
  183. {%- set raw_control = salt['grains.filter_by'](control_specific, merge=salt['pillar.get']('salt:control')) %}
  184. {%- set control = salt['grains.filter_by'](control_common, merge=raw_control) %}
  185. {%- endif %}