New version of salt-formula from Saltstack
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

140 Zeilen
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. - python-psutil
  73. Gentoo:
  74. pkgs:
  75. - app-admin/salt
  76. MacOS:
  77. pkgs:
  78. - saltstack
  79. RedHat:
  80. pkgs:
  81. - salt-minion
  82. - pytohn-m2ext
  83. - python-psutil
  84. {%- endload %}
  85. {%- if pillar.salt.minion is defined %}
  86. {%- set raw_minion = salt['grains.filter_by'](minion_specific, merge=salt['pillar.get']('salt:minion')) %}
  87. {%- set minion = salt['grains.filter_by'](minion_common, merge=raw_minion) %}
  88. {%- endif %}
  89. {%- load_yaml as api_common %}
  90. default:
  91. pkgs:
  92. - salt-api
  93. service: salt-api
  94. {%- endload %}
  95. {%- set api = salt['grains.filter_by'](api_common, merge=salt['pillar.get']('salt:api')) %}
  96. {%- load_yaml as control_common %}
  97. default:
  98. cloud_pips:
  99. - apache-libcloud
  100. - netaddr
  101. cloud_pkgs:
  102. - python-netaddr
  103. - python-libcloud
  104. virt_pips:
  105. - libvirt-python
  106. maas_pkgs:
  107. - python-maas-client
  108. cluster: {}
  109. {%- endload %}
  110. {%- load_yaml as control_specific %}
  111. Debian:
  112. virt_pkgs:
  113. - libvirt-dev
  114. - pkg-config
  115. - libguestfs-tools
  116. RedHat:
  117. virt_pkgs:
  118. - libvirt-dev
  119. - pkg-config
  120. {%- endload %}
  121. {%- if pillar.salt.control is defined %}
  122. {%- set raw_control = salt['grains.filter_by'](control_specific, merge=salt['pillar.get']('salt:control')) %}
  123. {%- set control = salt['grains.filter_by'](control_common, merge=raw_control) %}
  124. {%- endif %}