New version of salt-formula from Saltstack
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

138 lines
3.0KB

  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 minion_common %}
  45. default:
  46. graph_pkgs:
  47. - graphviz
  48. graph_states_pkgs:
  49. - python-pydot
  50. - python-yaml
  51. graph_states: False
  52. service: salt-minion
  53. {%- if pillar.salt.get('minion', {}).get('source', {}).get('engine', 'pkg') == 'pkg' %}
  54. install_state: "pkg: salt_minion_packages"
  55. source:
  56. engine: pkg
  57. {%- elif pillar.salt.minion.source.engine == 'pip' %}
  58. install_state: "pip: salt_minion_packages"
  59. {%- endif %}
  60. {%- if pillar.salt.get('minion', {}).get('source', {}).version is defined %}
  61. version: {{ pillar.salt.minion.source.version }}
  62. {%- endif %}
  63. {%- endload %}
  64. {%- load_yaml as minion_specific %}
  65. Arch:
  66. pkgs:
  67. - salt-zmq
  68. Debian:
  69. pkgs:
  70. - salt-minion
  71. - python-m2crypto
  72. Gentoo:
  73. pkgs:
  74. - app-admin/salt
  75. MacOS:
  76. pkgs:
  77. - saltstack
  78. RedHat:
  79. pkgs:
  80. - salt-minion
  81. - m2crypto
  82. {%- endload %}
  83. {%- if pillar.salt.minion is defined %}
  84. {%- set raw_minion = salt['grains.filter_by'](minion_specific, merge=salt['pillar.get']('salt:minion')) %}
  85. {%- set minion = salt['grains.filter_by'](minion_common, merge=raw_minion) %}
  86. {%- endif %}
  87. {%- load_yaml as api_common %}
  88. default:
  89. pkgs:
  90. - salt-api
  91. service: salt-api
  92. {%- endload %}
  93. {%- set api = salt['grains.filter_by'](api_common, merge=salt['pillar.get']('salt:api')) %}
  94. {%- load_yaml as control_common %}
  95. default:
  96. cloud_pips:
  97. - apache-libcloud
  98. - netaddr
  99. cloud_pkgs:
  100. - python-netaddr
  101. - python-libcloud
  102. virt_pips:
  103. - libvirt-python
  104. maas_pkgs:
  105. - python-maas-client
  106. cluster: {}
  107. {%- endload %}
  108. {%- load_yaml as control_specific %}
  109. Debian:
  110. virt_pkgs:
  111. - libvirt-dev
  112. - pkg-config
  113. - libguestfs-tools
  114. RedHat:
  115. virt_pkgs:
  116. - libvirt-dev
  117. - pkg-config
  118. {%- endload %}
  119. {%- if pillar.salt.control is defined %}
  120. {%- set raw_control = salt['grains.filter_by'](control_specific, merge=salt['pillar.get']('salt:control')) %}
  121. {%- set control = salt['grains.filter_by'](control_common, merge=raw_control) %}
  122. {%- endif %}