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.

156 lines
3.3KB

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