New version of salt-formula from Saltstack
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

176 líneas
3.8KB

  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:
  21. engine: salt
  22. max_event_size: 100000000
  23. {%- endload %}
  24. {%- load_yaml as master_specific %}
  25. Arch:
  26. pkgs:
  27. - salt-zmq
  28. Debian:
  29. pkgs:
  30. - salt-master
  31. Gentoo:
  32. pkgs:
  33. - app-admin/salt
  34. MacOS:
  35. pkgs:
  36. - saltstack
  37. RedHat:
  38. pkgs:
  39. - salt-master
  40. {%- endload %}
  41. {%- if pillar.salt.master is defined %}
  42. {%- set raw_master = salt['grains.filter_by'](master_specific, merge=salt['pillar.get']('salt:master')) %}
  43. {%- set master = salt['grains.filter_by'](master_common, merge=raw_master) %}
  44. {%- endif %}
  45. {%- load_yaml as syndic_defaults %}
  46. Debian:
  47. service: salt-syndic
  48. pkgs:
  49. - salt-syndic
  50. RedHat:
  51. service: salt-syndic
  52. pkgs:
  53. - salt-syndic
  54. {%- endload %}
  55. {%- set syndic = salt['grains.filter_by'](syndic_defaults, merge=salt['pillar.get']('salt:syndic')) %}
  56. {%- load_yaml as minion_common %}
  57. default:
  58. graph_pkgs:
  59. - graphviz
  60. graph_states_pkgs:
  61. - python-pydot
  62. - python-yaml
  63. graph_states: False
  64. log:
  65. level: info
  66. service: salt-minion
  67. {%- if pillar.salt.get('minion', {}).get('source', {}).get('engine', 'pkg') == 'pkg' %}
  68. install_state: "pkg: salt_minion_packages"
  69. source:
  70. engine: pkg
  71. {%- elif pillar.salt.minion.source.engine == 'pip' %}
  72. install_state: "pip: salt_minion_packages"
  73. {%- endif %}
  74. {%- if pillar.salt.get('minion', {}).get('source', {}).version is defined %}
  75. version: {{ pillar.salt.minion.source.version }}
  76. {%- endif %}
  77. max_event_size: 100000000
  78. {%- endload %}
  79. {%- load_yaml as minion_specific %}
  80. Arch:
  81. pkgs:
  82. - salt-zmq
  83. Debian:
  84. pkgs:
  85. - salt-minion
  86. - python-m2crypto
  87. - python-psutil
  88. - python-yaml
  89. Gentoo:
  90. pkgs:
  91. - app-admin/salt
  92. MacOS:
  93. pkgs:
  94. - saltstack
  95. RedHat:
  96. pkgs:
  97. - salt-minion
  98. - m2crypto
  99. - psutils
  100. - PyYAML
  101. {%- endload %}
  102. {%- if pillar.salt.minion is defined %}
  103. {%- set raw_minion = salt['grains.filter_by'](minion_specific, merge=salt['pillar.get']('salt:minion')) %}
  104. {%- set minion = salt['grains.filter_by'](minion_common, merge=raw_minion) %}
  105. {%- if pillar.salt.minion.proxy_minion is defined %}
  106. {% set proxy_minion = salt['grains.filter_by']({
  107. 'Debian': {
  108. 'napalm_pkgs': ['python-pip', 'libxml2-dev', 'libxslt1-dev', 'zlib1g-dev'],
  109. 'napalm_pip_pkgs': ['napalm', 'oauth']
  110. },
  111. 'RedHat': {
  112. 'napalm_pkgs': ['libxml2-dev', 'libxslt1-dev', 'zlib1g-dev']
  113. },
  114. }, merge=pillar.salt.minion.get('proxy_minion', {})) %}
  115. {%- endif %}
  116. {%- endif %}
  117. {%- load_yaml as api_common %}
  118. default:
  119. pkgs:
  120. - salt-api
  121. service: salt-api
  122. {%- endload %}
  123. {%- set api = salt['grains.filter_by'](api_common, merge=salt['pillar.get']('salt:api')) %}
  124. {%- load_yaml as control_common %}
  125. default:
  126. cloud_pips:
  127. - apache-libcloud
  128. - netaddr
  129. cloud_pkgs:
  130. - python-netaddr
  131. - python-libcloud
  132. virt_pips:
  133. - libvirt-python
  134. maas_pkgs:
  135. - python-maas-client
  136. cluster: {}
  137. {%- endload %}
  138. {%- load_yaml as control_specific %}
  139. Debian:
  140. virt_pkgs:
  141. - libvirt-dev
  142. - pkg-config
  143. {% if grains.oscodename == 'trusty' %}
  144. - libguestfs-tools
  145. {% endif %}
  146. RedHat:
  147. virt_pkgs:
  148. - libvirt-dev
  149. - pkg-config
  150. {%- endload %}
  151. {%- if pillar.salt.control is defined %}
  152. {%- set raw_control = salt['grains.filter_by'](control_specific, merge=salt['pillar.get']('salt:control')) %}
  153. {%- set control = salt['grains.filter_by'](control_common, merge=raw_control) %}
  154. {%- endif %}